Impect
kloppy.impect
load
Load Impect event data into a EventDataset
| PARAMETER | DESCRIPTION |
|---|---|
event_data
|
JSON feed with the raw event data of a game.
TYPE:
|
lineup_data
|
JSON feed with the corresponding lineup information of the game.
TYPE:
|
squads_data
|
Optional JSON feed with squad information for team names.
TYPE:
|
players_data
|
Optional JSON feed with player information for player names.
TYPE:
|
event_types
|
A list of event types to load. When set, only the specified event types will be loaded.
TYPE:
|
coordinates
|
The coordinate system to use. Defaults to "impect". See
TYPE:
|
event_factory
|
A custom event factory. When set, the factory is used to create event instances.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
EventDataset
|
The parsed event data. |
Source code in kloppy/_providers/impect.py
load_open_data
Load Impect open data.
This function loads event data directly from the ImpectAPI open-data GitHub repository.
| PARAMETER | DESCRIPTION |
|---|---|
match_id
|
The id of the match to load data for. Defaults to "100214".
TYPE:
|
competition_id
|
The competition id to load squad and player names from. Defaults to "743".
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. |
Examples:
>>> from kloppy import impect
>>> dataset = impect.load_open_data(match_id="100214")
>>> df = dataset.to_df(engine="pandas")