In [1]:
Copied!
from kloppy import tracab
dataset = tracab.load(
meta_data="../../kloppy/tests/files/tracab_meta.xml",
raw_data="../../kloppy/tests/files/tracab_raw.dat",
# Optional arguments
sample_rate=1/2,
limit=10,
coordinates="tracab",
only_alive=True
)
# Because this is a test dataset the output contains some garbage
dataset.to_df().head()
from kloppy import tracab
dataset = tracab.load(
meta_data="../../kloppy/tests/files/tracab_meta.xml",
raw_data="../../kloppy/tests/files/tracab_raw.dat",
# Optional arguments
sample_rate=1/2,
limit=10,
coordinates="tracab",
only_alive=True
)
# Because this is a test dataset the output contains some garbage
dataset.to_df().head()
Out[1]:
period_id | timestamp | frame_id | ball_state | ball_owning_team_id | ball_x | ball_y | ball_z | away_19_x | away_19_y | away_19_d | away_19_s | home_19_x | home_19_y | home_19_d | home_19_s | away_1337_x | away_1337_y | away_1337_d | away_1337_s | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 1 | 0.00 | 100 | alive | home | -27.0 | 25.0 | 0.0 | 8889.0 | -666.0 | NaN | 0.55 | -1234.0 | -294.0 | None | 0.07 | NaN | NaN | NaN | NaN |
1 | 2 | 0.00 | 200 | alive | home | -27.0 | 25.0 | 0.0 | NaN | NaN | NaN | NaN | -1234.0 | -294.0 | None | 0.07 | -8889.0 | -666.0 | NaN | 0.55 |
2 | 2 | 0.08 | 202 | alive | home | -27.0 | 25.0 | 0.0 | NaN | NaN | NaN | NaN | -1234.0 | -294.0 | None | 0.07 | -8889.0 | -666.0 | NaN | 0.55 |