Changelog#

All notable changes to this project will be documented in this file.

Unreleased#

1.3.0 - 2022-11-11#

Changed#

  • Runtime scheme validation of pandas dataframes is now disabled. This increases performance, but also means that the user is responsible for ensuring that the dataframes are valid.

Added#

  • Implement caching for the PublicWyscoutLoader. (GH277)

  • Distinguish between left/right foot in bodyparts (GH220)

  • The WyscoutLoader now also supports accessing the API. It is no longer needed to download the JSON files first.

Fixed#

  • Handle missing players in the public Wyscout data. (GH276)

  • The bodypart_onehot feature generator now sets “bodypart_head/other” to True for “head”, “other” and “head/other”. (GH275)

  • All feature generators now keep the original index of the input actions DataFrame.(GH273)

  • Fixed a PerformanceWarning in the actiontype_onehot, result_onehot, actiontype_result_onehot and bodypart_onehot feature generators. The efficiency of these generators should have been improved too. (GH370)

Removed#

  • ExpectedThreat.predict was renamed to ExpectedThreat.rate.

  • OptaLoader, OptaCompetitionSchema, OptaGameSchema, OptaPlayerSchema, OptaTeamSchema and OptaEventSchema were moved to socceraction.data.opta.

  • StatsBombLoader, extract_player_games, StatsBombCompetitionSchema, StatsBombGameSchema, StatsBombPlayerSchema, StatsBombTeamSchema and StatsBombEventSchema were moved to socceraction.data.statsbomb.

  • WyscoutLoader, PublicWyscoutLoader, WyscoutCompetitionSchema, WyscoutGameSchema, WyscoutPlayerSchema, WyscoutTeamSchema and WyscoutEventSchema were moved to socceraction.data.wyscout.

CI#

  • Added PyUpgrade to the CI pipeline to automatically update Python syntax.

  • Moved darglint to its own manual pre-commit hook.

  • Reduced merge conflicts using the lockfile-only strategy for Depandabot

1.2.3 - 2022-04-23#

Changed#

  • Spaces, dashes and underscores are now allowed in Opta filenames.

  • Wyscout considers a few off the ball fouls, namely “Out of play foul”, “Protest”, “Time lost foul” and “Late card foul”. These are now excluded from the SPADL representation. (GH240)

  • The Wyscout converter converted simulations to regular fouls. Now, we check if the preceding event was a take-on or a dribble. If so, we set the outcome to “failed” and drop the “Simulation”. Otherwise, we replace the “simulation” with a failed take-on. (GH240)

Fixed#

  • Fixed a bug where the WhoScored parser crashed when a coach received a red card.

  • Fixed a bug where the WhoScored parser crashed on events with out-of-bounds coordinates.

  • The “minutes_played” column in the “players” dataframe did not take red cards into account. This was fixed for all data providers.

  • The ExpectedThreat.rate method gave incorrect results when applied on a SPADL dataframe with duplicate index. (GH237)

1.2.2 - 2022-03-11#

Fixed#

  • Fix the atomic version of the goal_from_shot labeling function

  • Added missing opta event types 78 - 84

  • Fixes conversion of owngoals in Atomic-SPADL (GH198)

  • Fixes the result of shots when subsequent events are not registered due to replays (GH199)

  • Handle incorrect timestamps in Stats Perform event data

Documentation#

  • Added instruction for downloading test data to the contributor guide. Also, the download script was improved.

  • Fixed the description on how SPADL handles the direction of play

1.2.1 - 2022-01-09#

Fixed#

  • SchemaErrors on Windows (GH157)

1.2.0 - 2022-01-07#

Added#

  • Add support for loading StatsBomb 360 data

  • Add support for loading StatsBomb data directly from the paid API

  • Add documentation for the data module

  • Add documentation for the StatsBomb data schemas

  • Add documentation for the Opta data schemas

Changed#

  • Remove the requests dependency

  • Remove the Unicode dependency

  • Some fields in the Opta data schema were removed or renamed to make them more uniform with the other data loaders

  • The referee_id and venue_id fields were replaced by a referee and venue field, respectively

Fixed#

  • Fix a bug in the “minutes_played” field of the dataframe returned by the socceraction.data.wyscout.PublicWyscoutLoader.players method. (GH153)

  • Add missing WhoScored type ID (GH143)

  • Update the MA1 and MA3 Stats Perform parsers to make them compatible with the latest API version

  • Several small fixes in the Opta parsers

1.1.3 - 2021-12-20#

Fixed#

  • Support loading new StatsBomb event data containing 360 snaphots.

1.1.2 - 2021-12-08#

Added#

  • Use Poetry for depency management.

  • Use Nox for testing multiple Python versions.

  • Automatic depandency updates with Depandabot.

Changed#

  • Drop support for Python 3.6

  • Updated README.md

  • Updated CONTRIBUTING.md

  • Improved CI workflow with deployment to test PyPi and test coverage.

Fixed#

  • Bugs in the StatsPerform MA3 parser affecting extract_players().

  • Conversion to Atomic-SPADL changed the data type of the player_id column to float.

  • Fix incorrect type annnotations.

  • Wyscout action coordinates could be outside the [0, 68] or [0, 105] range.

  • Moved broken CI workflow from Travis to Github Actions.

1.1.1 - 2021-09-22#

Fixed#

  • Add missing data module to pip release.

1.1.0 - 2021-09-17#

Added#

  • Support for Stats Perform’s MA1 and MA3 JSON feeds by @JanVanHaaren and @denisov-vlad

  • Enhanced tests suite by use of @slow decorator, which is controlled via a --skip-slow command line argument.

  • A play_left_to_right() function to socceraction.spadl and socceraction.atomic.spadl which changes the start and end location of each action such that all actions are performed as if the team plays from left to right.

  • A load_model() function to socceraction.xthreat to load a precomputed xT grid

Changed#

  • Own goals are converted to a “bad_touch” SPADL event with outcome “owngoal”. Previously, the action type differed between providers. (GH26)

  • All event data loaders are moved from socceraction.spadl to socceraction.data

  • socceraction.xthreat.ExpectedThreat.predict is depracated and replaced by socceraction.xthreat.ExpectedThreat.rate to be compatible with the VAEP api

Fixed#

  • Bugs in OptaLoader’s extract_lineups() function affecting “is_starter” & “minutes_played” columns (GH48)

1.0.2 - 2021-04-03#

Fixed#

  • Opta converter converted goalkicks to regular passes (GH45)

  • Fix StatsBomb converter for the public CL dataset (GH46)

  • The goalscore feature also counted goalkicks as goals

1.0.1 - 2021-01-16#

Changed#

  • The WhoScored parser extracts the ‘competition_id’, ‘season_id’ and ‘game_id’ fields from the filename. It is no longer required to append these fields to the JSON.

1.0.0 - 2021-01-11#

Added#

  • Sphinx documentation

  • A PublicWyscoutLoader class which enables easy access to the open source Wyscout soccer-logs dataset (GH14)

  • A new bodypart type “head/other”, since Wyscout does not distinguish beteen headers and other body parts (GH27)

  • Unit tests for the StatsBomb, Opta and Wyscout data convertors.

  • Add an original_event_id column to the SPADL format (GH7)

  • Add an action_id column to Opta and Wyscout SPADL to be consistent with the StatsBomb converter

  • A high-level API for training VAEP and Atomic-VAEP models

  • A parser for WhoScored JSON

  • CI with Travis

  • A logo

  • Minimal version requirements for dependencies

Changed#

  • Opta and Wyscout convertors are refactored as a class based API to be consistent with the StatsBomb converter (GH23)

  • Details in the README are moved to the docs

Fixed#

  • Check for same period when adding dribbles.

  • Fix typo in StatsBomb converter

  • Fix type of return value in xthreat.predict

  • Fix ‘time_seconds’ field in the StatsBomb converter for overtime periods and shoutouts

  • Fix result of Wyscout interception passes (GH28)

  • Fix own goals from bad touch events (GH25)

0.2.1 - 2020-06-16#

Fixed#

  • Use the atomic version of actiontypes in Atomic-SPADL

0.2.0 - 2020-06-15#

Added#

  • Atomic-SPADL and Atomic-VAEP

Changed#

  • Rename socceraction.classification to socceraction.vaep

0.1.1 - 2020-01-30#

Added#

  • mypy typhinting

Fixed#

  • Add missing requests dependency

0.1.0 - 2020-01-22#

Changed#

  • Simpler and more transparant API for the StatsBomb converter

0.0.9 - 2020-01-14#

Added#

Fixed#

  • Information leakage in xG model

  • Fix end coordinates of clearances

0.0.8 - 2019-11-29#

Fixed#

  • Remove ujson from setup.py

0.0.7 - 2019-11-28#

Added#

  • Expected goals demo

Fixed#

  • Possibility of extra time periods in the Wyscout converter by @dbelcham

  • Fix utf-8 endcoding errors in convertors by @dbelcham

  • Retrieval of Wyscout substitutions by @dbelcham

  • Incorrect “bad touch” event type name in Opta parser

  • Fix SIGKDD citation in the readme

  • Fix storage of events in the optastore

Removed#

  • ujson dependency

0.0.6 - 2019-10-15#

Fixed#

  • Typo in statsbomb.py

  • Fixed “scores” and “concedes” label of the last action in a dataframe

0.0.5 - 2019-10-15#

Changed#

  • Improve speed and memory usage of the StatsBomb converter

  • Improve README

  • Add action_id column to spadl action table

Fixed#

  • Fixed Opta bugs related to fouls and playergamestats

0.0.4 - 2019-10-01#

Fixed#

  • Fixed encoding error in StatsBomb parser by @kim-younghan

  • Fixed start_angle_to_goal and end_angle_to_goal features

Removed#

  • LICENCE.txt

0.0.3 - 2019-08-26#

Added#

  • SPADL convertor for Wyscout event data

  • MIT License file

  • setup.py file

0.0.2 - 2019-07-31#

0.0.1 - 2019-07-31#

Initial release.