-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
305 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,291 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"id": "a93fc613", | ||
"metadata": {}, | ||
"source": [ | ||
"# StatsPerform\n", | ||
"\n", | ||
"## Load local files" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 3, | ||
"id": "e803a78c", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"<div>\n", | ||
"<style scoped>\n", | ||
" .dataframe tbody tr th:only-of-type {\n", | ||
" vertical-align: middle;\n", | ||
" }\n", | ||
"\n", | ||
" .dataframe tbody tr th {\n", | ||
" vertical-align: top;\n", | ||
" }\n", | ||
"\n", | ||
" .dataframe thead th {\n", | ||
" text-align: right;\n", | ||
" }\n", | ||
"</style>\n", | ||
"<table border=\"1\" class=\"dataframe\">\n", | ||
" <thead>\n", | ||
" <tr style=\"text-align: right;\">\n", | ||
" <th></th>\n", | ||
" <th>period_id</th>\n", | ||
" <th>timestamp</th>\n", | ||
" <th>frame_id</th>\n", | ||
" <th>ball_state</th>\n", | ||
" <th>ball_owning_team_id</th>\n", | ||
" <th>ball_x</th>\n", | ||
" <th>ball_y</th>\n", | ||
" <th>ball_z</th>\n", | ||
" <th>a2s2c6anax9wnlsw1s6vunl5h_x</th>\n", | ||
" <th>a2s2c6anax9wnlsw1s6vunl5h_y</th>\n", | ||
" <th>...</th>\n", | ||
" <th>6wfwy94p5bm0zv3aku0urfq39_d</th>\n", | ||
" <th>6wfwy94p5bm0zv3aku0urfq39_s</th>\n", | ||
" <th>6ekdnbnk56xlxforb5owt3dn9_x</th>\n", | ||
" <th>6ekdnbnk56xlxforb5owt3dn9_y</th>\n", | ||
" <th>6ekdnbnk56xlxforb5owt3dn9_d</th>\n", | ||
" <th>6ekdnbnk56xlxforb5owt3dn9_s</th>\n", | ||
" <th>ct32113pfx5q9avf2c0x208ru_x</th>\n", | ||
" <th>ct32113pfx5q9avf2c0x208ru_y</th>\n", | ||
" <th>ct32113pfx5q9avf2c0x208ru_d</th>\n", | ||
" <th>ct32113pfx5q9avf2c0x208ru_s</th>\n", | ||
" </tr>\n", | ||
" </thead>\n", | ||
" <tbody>\n", | ||
" <tr>\n", | ||
" <th>0</th>\n", | ||
" <td>1</td>\n", | ||
" <td>0.0</td>\n", | ||
" <td>1598184000000</td>\n", | ||
" <td>alive</td>\n", | ||
" <td>None</td>\n", | ||
" <td>52.350</td>\n", | ||
" <td>33.250</td>\n", | ||
" <td>0.0</td>\n", | ||
" <td>52.803</td>\n", | ||
" <td>23.617</td>\n", | ||
" <td>...</td>\n", | ||
" <td>None</td>\n", | ||
" <td>None</td>\n", | ||
" <td>5.268</td>\n", | ||
" <td>33.556</td>\n", | ||
" <td>None</td>\n", | ||
" <td>None</td>\n", | ||
" <td>NaN</td>\n", | ||
" <td>NaN</td>\n", | ||
" <td>None</td>\n", | ||
" <td>None</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>1</th>\n", | ||
" <td>1</td>\n", | ||
" <td>0.1</td>\n", | ||
" <td>1598184000100</td>\n", | ||
" <td>alive</td>\n", | ||
" <td>None</td>\n", | ||
" <td>50.615</td>\n", | ||
" <td>35.325</td>\n", | ||
" <td>0.0</td>\n", | ||
" <td>52.558</td>\n", | ||
" <td>23.752</td>\n", | ||
" <td>...</td>\n", | ||
" <td>None</td>\n", | ||
" <td>None</td>\n", | ||
" <td>5.265</td>\n", | ||
" <td>33.529</td>\n", | ||
" <td>None</td>\n", | ||
" <td>None</td>\n", | ||
" <td>NaN</td>\n", | ||
" <td>NaN</td>\n", | ||
" <td>None</td>\n", | ||
" <td>None</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>2</th>\n", | ||
" <td>1</td>\n", | ||
" <td>0.2</td>\n", | ||
" <td>1598184000200</td>\n", | ||
" <td>alive</td>\n", | ||
" <td>None</td>\n", | ||
" <td>49.630</td>\n", | ||
" <td>36.140</td>\n", | ||
" <td>0.0</td>\n", | ||
" <td>52.310</td>\n", | ||
" <td>23.901</td>\n", | ||
" <td>...</td>\n", | ||
" <td>None</td>\n", | ||
" <td>None</td>\n", | ||
" <td>5.264</td>\n", | ||
" <td>33.502</td>\n", | ||
" <td>None</td>\n", | ||
" <td>None</td>\n", | ||
" <td>NaN</td>\n", | ||
" <td>NaN</td>\n", | ||
" <td>None</td>\n", | ||
" <td>None</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>3</th>\n", | ||
" <td>1</td>\n", | ||
" <td>0.3</td>\n", | ||
" <td>1598184000300</td>\n", | ||
" <td>alive</td>\n", | ||
" <td>None</td>\n", | ||
" <td>48.725</td>\n", | ||
" <td>36.625</td>\n", | ||
" <td>0.0</td>\n", | ||
" <td>52.059</td>\n", | ||
" <td>24.071</td>\n", | ||
" <td>...</td>\n", | ||
" <td>None</td>\n", | ||
" <td>None</td>\n", | ||
" <td>5.268</td>\n", | ||
" <td>33.476</td>\n", | ||
" <td>None</td>\n", | ||
" <td>None</td>\n", | ||
" <td>NaN</td>\n", | ||
" <td>NaN</td>\n", | ||
" <td>None</td>\n", | ||
" <td>None</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>4</th>\n", | ||
" <td>1</td>\n", | ||
" <td>0.4</td>\n", | ||
" <td>1598184000400</td>\n", | ||
" <td>alive</td>\n", | ||
" <td>None</td>\n", | ||
" <td>47.890</td>\n", | ||
" <td>37.130</td>\n", | ||
" <td>0.0</td>\n", | ||
" <td>51.804</td>\n", | ||
" <td>24.260</td>\n", | ||
" <td>...</td>\n", | ||
" <td>None</td>\n", | ||
" <td>None</td>\n", | ||
" <td>5.277</td>\n", | ||
" <td>33.452</td>\n", | ||
" <td>None</td>\n", | ||
" <td>None</td>\n", | ||
" <td>NaN</td>\n", | ||
" <td>NaN</td>\n", | ||
" <td>None</td>\n", | ||
" <td>None</td>\n", | ||
" </tr>\n", | ||
" </tbody>\n", | ||
"</table>\n", | ||
"<p>5 rows × 100 columns</p>\n", | ||
"</div>" | ||
], | ||
"text/plain": [ | ||
" period_id timestamp frame_id ball_state ball_owning_team_id ball_x \n", | ||
"0 1 0.0 1598184000000 alive None 52.350 \\\n", | ||
"1 1 0.1 1598184000100 alive None 50.615 \n", | ||
"2 1 0.2 1598184000200 alive None 49.630 \n", | ||
"3 1 0.3 1598184000300 alive None 48.725 \n", | ||
"4 1 0.4 1598184000400 alive None 47.890 \n", | ||
"\n", | ||
" ball_y ball_z a2s2c6anax9wnlsw1s6vunl5h_x a2s2c6anax9wnlsw1s6vunl5h_y \n", | ||
"0 33.250 0.0 52.803 23.617 \\\n", | ||
"1 35.325 0.0 52.558 23.752 \n", | ||
"2 36.140 0.0 52.310 23.901 \n", | ||
"3 36.625 0.0 52.059 24.071 \n", | ||
"4 37.130 0.0 51.804 24.260 \n", | ||
"\n", | ||
" ... 6wfwy94p5bm0zv3aku0urfq39_d 6wfwy94p5bm0zv3aku0urfq39_s \n", | ||
"0 ... None None \\\n", | ||
"1 ... None None \n", | ||
"2 ... None None \n", | ||
"3 ... None None \n", | ||
"4 ... None None \n", | ||
"\n", | ||
" 6ekdnbnk56xlxforb5owt3dn9_x 6ekdnbnk56xlxforb5owt3dn9_y \n", | ||
"0 5.268 33.556 \\\n", | ||
"1 5.265 33.529 \n", | ||
"2 5.264 33.502 \n", | ||
"3 5.268 33.476 \n", | ||
"4 5.277 33.452 \n", | ||
"\n", | ||
" 6ekdnbnk56xlxforb5owt3dn9_d 6ekdnbnk56xlxforb5owt3dn9_s \n", | ||
"0 None None \\\n", | ||
"1 None None \n", | ||
"2 None None \n", | ||
"3 None None \n", | ||
"4 None None \n", | ||
"\n", | ||
" ct32113pfx5q9avf2c0x208ru_x ct32113pfx5q9avf2c0x208ru_y \n", | ||
"0 NaN NaN \\\n", | ||
"1 NaN NaN \n", | ||
"2 NaN NaN \n", | ||
"3 NaN NaN \n", | ||
"4 NaN NaN \n", | ||
"\n", | ||
" ct32113pfx5q9avf2c0x208ru_d ct32113pfx5q9avf2c0x208ru_s \n", | ||
"0 None None \n", | ||
"1 None None \n", | ||
"2 None None \n", | ||
"3 None None \n", | ||
"4 None None \n", | ||
"\n", | ||
"[5 rows x 100 columns]" | ||
] | ||
}, | ||
"execution_count": 3, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"from kloppy import statsperform\n", | ||
"\n", | ||
"dataset = statsperform.load(\n", | ||
" raw_data=\"../../kloppy/tests/files/statsperform_ma25_tracking.txt\",\n", | ||
" meta_data=\"../../kloppy/tests/files/statsperform_ma1_metadata.xml\",\n", | ||
" \n", | ||
" # Optional arguments\n", | ||
" coordinates=\"statsperform\"\n", | ||
")\n", | ||
"\n", | ||
"dataset.to_df().head()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "6780ce08", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "kloppy-venv", | ||
"language": "python", | ||
"name": "kloppy-venv" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.10.6" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,4 @@ | |
# ) | ||
# from .domain.services.state_builder import add_state | ||
|
||
__version__ = "3.10.1" | ||
__version__ = "3.11.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters