floodlight - A high-level, data-driven sports analytics framework

floodlight - A high-level, data-driven sports analytics framework - Published in JOSS (2022)

https://github.com/floodlight-sports/floodlight

Science Score: 93.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 7 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: arxiv.org, joss.theoj.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

python sports-analytics sports-stats

Scientific Fields

Mathematics Computer Science - 84% confidence
Last synced: 6 months ago · JSON representation

Repository

Python package for streamlined analysis of sports data.

Basic Info
Statistics
  • Stars: 92
  • Watchers: 5
  • Forks: 17
  • Open Issues: 20
  • Releases: 4
Topics
python sports-analytics sports-stats
Created over 4 years ago · Last pushed 7 months ago
Metadata Files
Readme Changelog Contributing License

README.md

floodlight

Latest Version Python Version Documentation Status Build Status Linting Status Codecov DOI

A high-level, data-driven sports analytics framework

floodlight is a Python package for streamlined analysis of sports data. It is designed with a clear focus on scientific computing and built upon popular libraries such as numpy or pandas.

Load, process, and model tracking and event data, codes and other match-related information from over ten major data providers or public datasets. This package provides a range of popular analyses and methods such as space control models, metabolic power, approximate entropy out of the box. Under the hood, the package comes with a set of standardized data objects to structure and handle sports data, together with a suite of common processing operations such as transforms or data manipulation methods.

All implementations run completely provider- and sports-independent, while maintaining a maximum of flexibility to incorporate as many data flavours as possible. A high-level interface allows easy access to all standard routines, so that you can stop worrying about data wrangling and start focussing on the analysis instead!



Quick Demo

floodlight simplifies sports data loading, processing and advanced performance analyses. Check out the example below, where querying a public data sample, filtering the data and computing the expended metabolic work of the active home team players is done in a few lines of code:

```

from floodlight.io.datasets import EIGDDataset from floodlight.transforms.filter import butterworth_lowpass from floodlight.models.kinetics import MetabolicPowerModel

dataset = EIGDDataset() hometeamdata, awayteamdata, ball_data = dataset.get()

hometeamdata = butterworthlowpass(hometeam_data)

model = MetabolicPowerModel() model.fit(hometeamdata) metabolicpower = model.cumulativemetabolic_power()

print(metabolic_power[-1, 0:7])

[1669.18781115 1536.22481121 1461.03243489 1488.61249785 773.09264071 1645.01702421 746.94057676] ```

To find out more, see the full set of features below or get started quickly with one of our many tutorials from the official documentation!

Features

We provide core data structures for team sports data, parsing functionality for major data providers, access points to public data sets, data filtering, plotting routines and many computational models from the literature. The feature set is constantly expanding, and if you want to add more just open an issue!

Data-level Objects

  • Tracking data
  • Event data
  • Pitch information
  • Teamsheets with player information
  • Codes such as ball possession information
  • Properties such as distances or advanced computations

Parser

  • Tracab/ChyronHego: Tracking data, Teamsheets, Codes
  • DFL/STS: Tracking data, Event data, Teamsheets, Codes
  • Kinexon: Tracking data
  • Opta: Event data (F24 feeds)
  • Second Spectrum: Tracking data, Event data
  • Skillcorner: Tracking data from the Skillcorner Open Dataset (new)
  • Sportradar: Event data
  • StatsPerform: Tracking data, Event data (with URL access)
  • StatsBomb: Event data

Datasets

  • EIGD-H (Handball tracking data)
  • IDSSE (Football tracking and event data) (new)
  • StatsBomb OpenData (Football event data)

Manipulation and Plotting

  • Spatial transformations for all data structures
  • Lowpass-filter tracking data
  • Slicing, selection and sequencing methods
  • Plot pitches, player positions and model overlays

Models and Metrics

  • Approximate Entropy
  • Centroids
  • Distances, Velocities & Accelerations
  • Metabolic Power & Equivalent Distances
  • Voronoi Space Control

Installation

The package can be installed easily via pip:

pip install floodlight

Citing

If you've used floodlight in your scientific work, please cite the corresponding paper.

@article{Raabe2022, doi = {10.21105/joss.04588}, url = {https://doi.org/10.21105/joss.04588}, year = {2022}, publisher = {The Open Journal}, volume = {7}, number = {76}, pages = {4588}, author = {Dominik Raabe and Henrik Biermann and Manuel Bassek and Martin Wohlan and Rumena Komitova and Robert Rein and Tobias Kuppens Groot and Daniel Memmert}, title = {floodlight - A high-level, data-driven sports analytics framework}, journal = {Journal of Open Source Software} }

Documentation

You can find all documentation here.

Contributing

Contributions Code style: black

Check out Contributing.md for a quick rundown of what you need to know to get started. We also provide an extended, beginner-friendly guide on how to start contributing in our documentation.

Why

Why do we need another package that introduces its own data structures and ways of dealing with certain problems? And what's the purpose of trying to integrate all different data sources and fit them into a single framework? Especially since there already exist packages that aim to solve certain parts of that pipeline?

Our answer is - although we love those packages out there - that we did not find a solution that did fit our needs. Available packages are either tightly connected to a certain data format/provider, adapt to the subtleties of a particular sport, or solve one particular problem. This still left us with the essential problem of adapting to different interfaces.

We felt that as long as there is no underlying, high-level framework, each and every use case again and again needs its own implementation. At last, we found ourselves refactoring the same code - and there are certain data processing or plotting routines that are required in almost every project - over and over again just to fit the particular data structures we're dealing with at that time.

Acknowledgements

This project has received funding by the BMBF (Bundesministerium für Bildung und Forschung, 01IS20021A) and the DFG (Deutsche Forschungsgemeinschaft, ME 2678/43-1) and has been kindly supported by the Institute of Exercise Training and Sport Informatics at the German Sport University Cologne.

See also

Owner

  • Name: floodlight-sports
  • Login: floodlight-sports
  • Kind: organization

JOSS Publication

floodlight - A high-level, data-driven sports analytics framework
Published
August 26, 2022
Volume 7, Issue 76, Page 4588
Authors
Dominik Raabe ORCID
Institute of Exercise Training and Sport Informatics, German Sport University Cologne, Germany
Henrik Biermann ORCID
Institute of Exercise Training and Sport Informatics, German Sport University Cologne, Germany
Manuel Bassek ORCID
Institute of Exercise Training and Sport Informatics, German Sport University Cologne, Germany
Martin Wohlan ORCID
Institute of Exercise Training and Sport Informatics, German Sport University Cologne, Germany
Rumena Komitova ORCID
Institute of Exercise Training and Sport Informatics, German Sport University Cologne, Germany
Robert Rein ORCID
Institute of Exercise Training and Sport Informatics, German Sport University Cologne, Germany
Tobias Kuppens Groot ORCID
Independent Researcher, Netherlands
Daniel Memmert ORCID
Institute of Exercise Training and Sport Informatics, German Sport University Cologne, Germany
Editor
Chris Vernon ORCID
Tags
sport science performance analysis exercise physiology training science collective movement behavior sports analytics

GitHub Events

Total
  • Release event: 1
  • Issues event: 3
  • Watch event: 17
  • Issue comment event: 2
  • Push event: 5
  • Pull request event: 7
  • Pull request review event: 29
  • Pull request review comment event: 28
  • Fork event: 1
Last Year
  • Release event: 1
  • Issues event: 3
  • Watch event: 17
  • Issue comment event: 2
  • Push event: 5
  • Pull request event: 7
  • Pull request review event: 29
  • Pull request review comment event: 28
  • Fork event: 1

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 223
  • Total Committers: 7
  • Avg Commits per committer: 31.857
  • Development Distribution Score (DDS): 0.215
Past Year
  • Commits: 13
  • Committers: 2
  • Avg Commits per committer: 6.5
  • Development Distribution Score (DDS): 0.231
Top Committers
Name Email Commits
draabe d****x@p****g 175
hbiermann95 5****5 21
manuba95 m****k@g****m 15
MartinWohlan 7****n 5
tkgroot t****o@u****e 3
rkomitova 6****a 2
Rob r****t 2
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 18
  • Total pull requests: 115
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 19 days
  • Total issue authors: 9
  • Total pull request authors: 12
  • Average comments per issue: 2.11
  • Average comments per pull request: 0.69
  • Merged pull requests: 77
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 3
  • Pull requests: 18
  • Average time to close issues: N/A
  • Average time to close pull requests: 3 days
  • Issue authors: 3
  • Pull request authors: 5
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.56
  • Merged pull requests: 6
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • kanishkan91 (9)
  • Alek050 (2)
  • hbiermann95 (1)
  • PaddingtonBrown (1)
  • UnravelSports (1)
  • draabe (1)
  • robertreingit (1)
  • MarkoR97 (1)
Pull Request Authors
  • hbiermann95 (39)
  • draabe (29)
  • manuba95 (29)
  • VellaRo (17)
  • MartinWohlan (8)
  • tkgroot (2)
  • robertreingit (2)
  • mad4ms (2)
  • tehbeh86 (2)
  • UnravelSports (2)
  • rkomitova (1)
  • pedoneA2 (1)
Top Labels
Issue Labels
bug (4) enhancement (2) help wanted (1)
Pull Request Labels
enhancement (7) duplicate (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 225 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 9
  • Total maintainers: 1
pypi.org: floodlight

A high-level framework for sports data analysis

  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 225 Last month
Rankings
Stargazers count: 9.7%
Dependent packages count: 10.1%
Forks count: 10.5%
Average: 14.5%
Downloads: 20.4%
Dependent repos count: 21.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

docs/requirements.txt pypi
  • sphinx ==4.2.0
  • sphinx-autodoc-typehints ==1.12.0
  • sphinx-rtd-theme ==1.0.0
poetry.lock pypi
  • alabaster 0.7.12 develop
  • argcomplete 1.12.3 develop
  • atomicwrites 1.4.0 develop
  • attrs 21.2.0 develop
  • auto-changelog 0.5.3 develop
  • babel 2.9.1 develop
  • backports.entry-points-selectable 1.1.1 develop
  • black 21.12b0 develop
  • certifi 2021.10.8 develop
  • cfgv 3.3.1 develop
  • charset-normalizer 2.0.9 develop
  • click 7.1.2 develop
  • colorama 0.4.4 develop
  • commitizen 2.20.0 develop
  • decli 0.5.2 develop
  • distlib 0.3.4 develop
  • docopt 0.6.2 develop
  • docutils 0.17.1 develop
  • filelock 3.4.0 develop
  • flake8 3.9.2 develop
  • gitdb 4.0.9 develop
  • gitpython 3.1.24 develop
  • identify 2.4.0 develop
  • idna 3.3 develop
  • imagesize 1.3.0 develop
  • iniconfig 1.1.1 develop
  • jinja2 2.11.3 develop
  • markupsafe 2.0.1 develop
  • mccabe 0.6.1 develop
  • mypy-extensions 0.4.3 develop
  • nodeenv 1.6.0 develop
  • pathspec 0.9.0 develop
  • platformdirs 2.4.0 develop
  • pluggy 1.0.0 develop
  • pre-commit 2.16.0 develop
  • prompt-toolkit 3.0.24 develop
  • py 1.11.0 develop
  • pycodestyle 2.7.0 develop
  • pyflakes 2.3.1 develop
  • pygments 2.10.0 develop
  • pytest 6.2.5 develop
  • pyyaml 6.0 develop
  • questionary 1.10.0 develop
  • requests 2.26.0 develop
  • smmap 5.0.0 develop
  • snowballstemmer 2.2.0 develop
  • sphinx 4.3.1 develop
  • sphinx-autodoc-typehints 1.12.0 develop
  • sphinx-rtd-theme 1.0.0 develop
  • sphinxcontrib-applehelp 1.0.2 develop
  • sphinxcontrib-devhelp 1.0.2 develop
  • sphinxcontrib-htmlhelp 2.0.0 develop
  • sphinxcontrib-jsmath 1.0.1 develop
  • sphinxcontrib-qthelp 1.0.3 develop
  • sphinxcontrib-serializinghtml 1.1.5 develop
  • termcolor 1.1.0 develop
  • toml 0.10.2 develop
  • tomlkit 0.7.2 develop
  • urllib3 1.26.7 develop
  • virtualenv 20.10.0 develop
  • wcwidth 0.2.5 develop
  • cached-property 1.5.2
  • cycler 0.11.0
  • fonttools 4.30.0
  • h5py 3.6.0
  • iso8601 1.0.2
  • kiwisolver 1.4.0
  • lxml 4.7.0
  • matplotlib 3.5.1
  • numpy 1.21.4
  • packaging 21.3
  • pandas 1.3.5
  • pillow 9.0.1
  • pyparsing 3.0.6
  • python-dateutil 2.8.2
  • pytz 2021.3
  • scipy 1.8.0
  • setuptools-scm 6.4.2
  • six 1.16.0
  • tomli 1.2.2
  • typing-extensions 4.0.1
pyproject.toml pypi
  • Sphinx ^4.2.0 develop
  • auto-changelog ^0.5.3 develop
  • black ^21.9b0 develop
  • commitizen ^2.20.0 develop
  • flake8 ^3.9.2 develop
  • pre-commit ^2.15.0 develop
  • pytest ^6.2.5 develop
  • sphinx-autodoc-typehints ^1.12.0 develop
  • sphinx-rtd-theme ^1.0.0 develop
  • h5py ^3.6.0
  • iso8601 ^1.0.2
  • lxml ^4.6.4
  • matplotlib ^3.5.1
  • numpy ^1.21.2
  • pandas ^1.3.4
  • python >=3.8, <3.11
  • pytz ^2021.3
  • scipy ^1.8.0
.github/workflows/build.yaml actions
  • abatilo/actions-poetry v2.0.0 composite
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • codecov/codecov-action v3 composite
.github/workflows/linting.yaml actions
  • actions/checkout v2 composite
  • actions/setup-python v1 composite
  • py-actions/flake8 v1 composite