socceraction.data.wyscout.WyscoutLoader#

class socceraction.data.wyscout.WyscoutLoader(root='https://apirest.wyscout.com/v2/', getter='remote', feeds=None)#

Load event data either from a remote location or from a local folder.

Parameters
  • root (str) – Root-path of the data.

  • getter (str) – “remote”, “local” or None. If None, custom feeds should be provided.

  • feeds (dict(str, str)) –

    Glob pattern for each feed that should be parsed. The fefault feeds for a “remote” getter are:

    {
        'competitions': 'competitions',
        'seasons': 'competitions/{season_id}/seasons',
        'games': 'seasons/{season_id}/matches',
        'events': 'matches/{game_id}/events'
    }
    

    The fefault feeds for a “local” getter are:

    {
        'competitions': 'competitions.json',
        'seasons': 'seasons_{competition_id}.json',
        'games': 'matches_{season_id}.json',
        'events': 'matches/events_{game_id}.json',
    }
    

Methods

__init__

competitions

Return a dataframe with all available competitions and seasons.

events

Return a dataframe with the event stream of a game.

games

Return a dataframe with all available games in a season.

players

Return a dataframe with all players that participated in a game.

teams

Return a dataframe with both teams that participated in a game.