Skip to main content

Convert soccer event stream data to the SPADL format and value on-the-ball player actions

Project description

Convert soccer event stream data to the SPADL format
and value on-the-ball player actions.


PyPi Python Version: 3.7.1+ Downloads License: MIT

Build Status Read the Docs Code coverage



Socceraction is a Python package for objectively quantifying the impact of the individual actions performed by soccer players using event stream data. The general idea is to assign a value to each on-the-ball action based on the action's impact on the game outcome, while accounting for the context in which the action happened. The video below gives a quick two-minute introduction to action values.

Features

Socceraction contains the following components:

  • Loaders for StatsBomb, Opta, Wyscout, StatsPerform and WhoScored data that enable loading events and corresponding metadata as Pandas DataFrames using a unified data model. Read more »
  • Converters for event stream data to the SPADL and atomic-SPADL formats, which are unified and expressive languages for on-the-ball player actions. Read more »
  • An implementation of the xT framework to value ball-progressing actions using a possession-based Markov model. Read more »
  • An implementation of the VAEP and Atomic-VAEP frameworks to value actions on their expected impact on the score line. Read more »

Installation / Getting started

The recommended way to install socceraction is to simply use pip. The latest version officially supports Python 3.7.1 - 3.9.

$ pip install socceraction

The folder public-notebooks provides a demo of the full pipeline from raw StatsBomb event stream data to action values and player ratings. More detailed installation/usage instructions can be found in the Documentation.

Contributing

All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. However, be aware that socceraction is not actively developed. It's primary use is to enable reproducibility of our research. If you believe there is a feature missing, feel free to raise a feature request, but please do be aware that the overwhelming likelihood is that your feature request will not be accepted. To learn more on how to contribute, see the Contributor Guide.

Research

If you make use of this package in your research, please consider citing the following papers:

  • Decroos, Tom, Lotte Bransen, Jan Van Haaren, and Jesse Davis. Actions speak louder than goals: Valuing player actions in soccer. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 1851-1861. 2019.
    [ pdf | bibtex ]

  • Maaike Van Roy, Pieter Robberechts, Tom Decroos, and Jesse Davis. Valuing on-the-ball actions in soccer: a critical comparison of XT and VAEP. In Proceedings of the AAAI-20 Workshop on Artifical Intelligence in Team Sports. AI in Team Sports Organising Committee, 2020.
    [ pdf | bibtex ]

The Expected Threat (xT) framework was originally introduced by Karun Singh on his blog in 2019.

License

Distributed under the terms of the MIT license, socceraction is free and open source software. Although not strictly required, we appreciate it if you include a link to this repo or cite our research in your work if you make use of socceraction.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

socceraction-1.1.3.tar.gz (59.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

socceraction-1.1.3-py3-none-any.whl (78.8 kB view details)

Uploaded Python 3

File details

Details for the file socceraction-1.1.3.tar.gz.

File metadata

  • Download URL: socceraction-1.1.3.tar.gz
  • Upload date:
  • Size: 59.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for socceraction-1.1.3.tar.gz
Algorithm Hash digest
SHA256 a87b1054bc6a27aa7c6dcebd8cd453d9d6b5f1ff99bb1ad55352e35898f9df3f
MD5 b15cbacb273ad8eb4b6e83aa50b33455
BLAKE2b-256 10943dbc8c0495d974d9ea251833da2a7b16fb662589a653bc13993e22fc7507

See more details on using hashes here.

File details

Details for the file socceraction-1.1.3-py3-none-any.whl.

File metadata

  • Download URL: socceraction-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 78.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for socceraction-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 53e3dc0b37238cd77197af9b4f7317d7935593d73474bcf679e5725dd72106b3
MD5 6ad3c185993b6c6ef5539749da78460d
BLAKE2b-256 03ab6c209cad9df6956a5560dfbfc40532e8c6fb157f75cd394f414148ea0df3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page