Data providers#

Socceraction provides loaders for various popular data sources that enable loading events and corresponding metadata as Pandas DataFrames using a unified data model. Currently, the following data sources are supported:

Data source

Loader

Usage

StatsBomb API

StatsBombLoader

StatsBombLoader(getter="remote", creds={"user": "", "passwd": ""})

StatsBomb public data

StatsBombLoader

StatsBombLoader(getter="remote", creds=None)

StatsBomb local data

StatsBombLoader

StatsBombLoader(getter="local", root="data/statsbomb")

Wyscout local data

WyscoutLoader

WyscoutLoader(getter="local", root="data/wyscout")

Wyscout public data

PublicWyscoutLoader

PublicWyscoutLoader(root="data/wyscout-public")

Opta F7 and F24 XML feeds

OptaLoader

OptaLoader(root="data/opta", parser="xml")

Opta F1, F9 and F24 JSON feeds

OptaLoader

OptaLoader(root="data/opta", parser="json")

Stats Perform MA1 and MA3 JSON feeds

OptaLoader

OptaLoader(root="data/statsperform", parser="statsperform")

WhoScored data

OptaLoader

OptaLoader(root="data/whoscored", parser="whoscored")

Each Loader class provides the following methods:

Method

Parameters

Description

competitions()

All available competitions and seasons

games()

competition_id, season_id

All available games in a season

teams()

game_id

Both teams that participated in a game

players()

game_id

All players that participated in a game

events()

game_id

The event stream of a game

Refer to the API reference for detailed instructions on how to use each loader.