More stat formatting cleverness (blind steals)

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

More stat formatting cleverness (blind steals)

Postby WhiteRider » Fri Sep 05, 2008 7:42 am

While playing around with some blind steal attempt and success stats I stumbled across a neat little trick to make reports clearer to read.

I built a stat to show how often a player's blind steals succeed (player makes a steal raise and everyone folds) in the 'holdem cash player statistics' section, and added a checkbox stat to the 'holdem cash hands' section so that I can quickly see which hands the stats apply to. (I use the Hands tab and add stats to both sections so I can get the overview figures in the top report and then analyse which hands they apply to in the bottom).
This checkbox stat is initially formatted like this:
format expression = format_bool( flg_p_steal_success, 'check' )

This checkbox stat ("Steal Succeeded") is checked if the steal succeeded, and unchecked when the steal failed but also, confusingly, when no steal was attempted. I wanted to make it easer to find when a steal was attempted, and thought of this:
format expression = if ( flg_steal_attempt, format_bool(flg_steal_success,'check'), '' )

This checks to see if a steal was attempted:
"if ( flg_steal_attempt"
..and if so it draws the checkbox to show whether the steal succeeded:
"format_bool(flg_steal_success,'check')"
..but if not it doesn't show anything (empty single quotes):
''
So if a steal was attempted and succeeded you get a checked checkbox, if a steal was attempted but failed you get an unchecked checkbox, if no steal was attempted you get an empty cell.
StealCheckboxes.PNG
(1.29 KiB) Downloaded 2206 times


I did the same thing for an "attempt to steal" stat, which only shows the checkbox if there is an opportunity to steal.
format expression = if ( flg_steal_opp, format_bool(flg_steal_attempt,'check'), '' )


I did a similar thing for my "Steal Success" stats in 'holdem cash player statistics', but with colour.
I added a colour condition "cnt_steal_att=0 -> pale grey" so that if the player has never attempted to steal the stat will be shown in pale grey and the cases where steals were attempted stand out much more clearly.
ATS.PNG
(1.63 KiB) Downloaded 2195 times

You could use the above idea instead, using an IF statement in the format expression field to show the numbers if steals have been attempted, or show "N/A" (or whatever) otherwise, but I prefer the colouring method.

All of the stats mentioned here have been submitted to the Repository, but until they are accepted I have also attached them here:

StealAttempts.zip
Copy of file submitted to the Repository. "Steal attempts and success"
(2.9 KiB) Downloaded 249 times
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 3 guests