The Game class is a convienient representation of a single pickleball game. It will calculate basic stats for each player.
source
Game
Game (game_id:str)
A class to represent a game of pickleball.
g = Game('G40')
g.players
|
player_id |
first_nm |
last_nm |
supp_nm |
gender |
dom_hand |
maint_dtm |
maint_app |
create_dtm |
create_app |
8 |
P60 |
Payton |
Noyes |
NaN |
M |
R |
2022-11-07 02:44:59.019000+00:00 |
aspancake |
2022-11-07 02:44:59.019000+00:00 |
aspancake |
56 |
P49 |
Jon |
Smet |
NaN |
M |
R |
2022-09-25 03:10:34.044267+00:00 |
postgres |
2022-09-25 03:10:34.044267+00:00 |
postgres |
57 |
P50 |
Alex |
Spancake |
NaN |
M |
R |
2022-09-25 03:10:34.048974+00:00 |
postgres |
2022-09-25 03:10:34.048974+00:00 |
postgres |
69 |
P59 |
Mike |
Strain |
NaN |
M |
R |
2022-11-07 02:44:59.019000+00:00 |
aspancake |
2022-11-07 02:44:59.019000+00:00 |
aspancake |
source
Game.plot_impact_flow
Game.plot_impact_flow ()
Plots the impact flow for each player in a given game. Defined as winners + errors_forced - unforced errors.
source
Game.summarize_third_shots
Game.summarize_third_shots ()
Summarizes the types of 3rd shots for each player in a game
g.summarize_third_shots()
Player Drops % Drives % Lobs % Total Thirds
Payton Noyes 87.50 12.50 0.0 8
Jon Smet 75.00 25.00 0.0 4
Alex Spancake 33.33 66.67 0.0 12
Mike Strain 88.89 11.11 0.0 9
source
Game.summarize_game
Game.summarize_game ()
Prints a summary of the game.
Anna Leigh Waters & Leigh Waters beat Jesse Irvine & Catherine Parenteau 12-10 in game G1
Player Error % Winner %
Jesse Irvine 17.46 9.52
Catherine Parenteau 1.59 0.00
Anna Leigh Waters 1.59 3.17
Leigh Waters 9.52 4.76