A library for accessing and analyzing Pickleball data from pklmart
Project description
pklshop
A library for accessing and analyzing Pickleball data from pklmart. You can find the full documentation here.
Install
Install using:
pip install pklshop
How to use
First, you’ll need to setup a database.ini
file (it’s only about 5
lines). This should be stored in the pklshop
root directory. Check out
connect
for an example of how to write this.
Once that’s done, this lib provides a function
get_tab_as_df
you can use to create and display tables within the database
Available tables are:
table_names
['tournament',
'match',
'game',
'rally',
'shot_type_ref',
'shot',
'player',
'team']
match_df = get_tab_as_df("match")
game_df = get_tab_as_df("game")
match_df.head()
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
</style>
match_id | tourn_id | consol_ind | team_id_1 | team_id_2 | maint_dtm | maint_app | create_dtm | create_app | |
---|---|---|---|---|---|---|---|---|---|
0 | M1 | T1 | N | T1 | T2 | 2022-04-09 03:19:33.840951+00:00 | postgres | 2022-04-09 03:19:33.840951+00:00 | postgres |
1 | M2 | T2 | N | T2 | T3 | 2022-05-26 00:45:11.301752+00:00 | postgres | 2022-05-26 00:45:11.301752+00:00 | postgres |
2 | M5 | T5 | N | T6 | T5 | 2022-06-28 00:40:22.948360+00:00 | postgres | 2022-06-28 00:40:22.948360+00:00 | postgres |
3 | M6 | T6 | N | T5 | T7 | 2022-07-07 23:01:45.921540+00:00 | postgres | 2022-07-07 23:01:45.921540+00:00 | postgres |
4 | M7 | T7 | N | T8 | T9 | 2022-07-11 02:40:50.597016+00:00 | postgres | 2022-07-11 02:40:50.597016+00:00 | postgres |
g = Game("G1")
g.summarize_game()
Anna Leigh Waters & Leigh Waters beat Jesse Irvine & Catherine Parenteau 12-10 in game G1
Player Error % Winner %
0 Jesse Irvine 17.46 9.52
1 Catherine Parenteau 1.59 0.00
2 Anna Leigh Waters 1.59 3.17
3 Leigh Waters 9.52 4.76
To see a more complete analysis in action, check out the examples. Also check out Connor and this analysis by conner-mcnicholas on timeout momentum!
r = Rally(“R1020”) r.animate_rally()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pklshop-0.0.3.tar.gz
.
File metadata
- Download URL: pklshop-0.0.3.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 749cc5774a3d1287e16338de52c923fecb5a444ed1a4333e163515d80ec007d3 |
|
MD5 | e90d3b89ca8fac467d929a14b79c20a8 |
|
BLAKE2b-256 | 2c05703d48fb2a88ab6577ca306c1ae24ad9576cf5756083fa1ca4fa72cfc581 |
File details
Details for the file pklshop-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: pklshop-0.0.3-py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb387d8cb8b38f716b2bfaf162161e2417f9a3a616b4f4760758ab97a5879ad2 |
|
MD5 | 2b703394b35c446b8f00836120226089 |
|
BLAKE2b-256 | e6156faf93a51d07949d02db9555d2c03d65d668417604688b3ba57e92c900ba |