Metrica Sports
kloppy.metrica
Functions for loading Metrica Sports event and tracking data.
load_event
Load Metrica Sports JSON event data.
PARAMETER | DESCRIPTION |
---|---|
event_data
|
A json feed containing the raw event data.
TYPE:
|
meta_data
|
A xml feed containing the match meta data.
TYPE:
|
event_types
|
A list of event types to load.
TYPE:
|
coordinates
|
The coordinate system to use.
TYPE:
|
event_factory
|
A custom event factory.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
EventDataset
|
The parsed event data. |
Source code in kloppy/_providers/metrica.py
load_open_data
Load Metrica Sports open data.
This function loads tracking data directly from Metrica's open data GitHub repository.
PARAMETER | DESCRIPTION |
---|---|
match_id
|
The id of the match to load data for.
TYPE:
|
sample_rate
|
Sample the data at a specific rate.
TYPE:
|
limit
|
Limit the number of frames to load to the first
TYPE:
|
coordinates
|
The coordinate system to use.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
TrackingDataset
|
The parsed event data. |
Source code in kloppy/_providers/metrica.py
load_tracking_csv
Load Metrica Sports CSV tracking data.
PARAMETER | DESCRIPTION |
---|---|
home_data
|
The raw tracking data for the home team.
TYPE:
|
away_data
|
The raw tracking data for the away team.
TYPE:
|
sample_rate
|
Sample the data at a specific rate.
TYPE:
|
limit
|
Limit the number of frames to load to the first
TYPE:
|
coordinates
|
The coordinate system to use.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
TrackingDataset
|
The parsed tracking data. |
Source code in kloppy/_providers/metrica.py
load_tracking_epts
Load Metrica Sports EPTS tracking data.
PARAMETER | DESCRIPTION |
---|---|
meta_data
|
A xml feed containing the match meta data.
TYPE:
|
raw_data
|
A feed containing the raw tracking data in the EPTS format.
TYPE:
|
sample_rate
|
Sample the data at a specific rate.
TYPE:
|
limit
|
Limit the number of frames to load to the first
TYPE:
|
coordinates
|
The coordinate system to use.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
TrackingDataset
|
The parsed tracking data. |