Skip to main content

A high-level framework for sports data analysis

Project description

floodlight

Latest Version Python Version Documentation Status Build Status Linting Status Code style: black arXiv

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, integrate, and process tracking and event data, codes and other match-related information from major data providers. This package provides 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!



Features

This project is still under development, and we hope to expand the set of features in the future. At this point, we provide core data structures, parsing functionality for major data providers, access to public data sets, data filtering, basic plotting routines and computational models.

Data-level Objects

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

Parser

  • ChyronHego (Tracking data, Codes)
  • DFL (Tracking data, Event data, Codes)
  • Kinexon (Tracking data)
  • Opta (Event data - F24 feeds)
  • Second Spectrum (Tracking data)
  • StatsPerform (Tracking data, Event data - also directly from URLs)
  • StatsBomb (Event data)

Datasets

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

Manipulation and Plotting

  • Spatial transformations for all data structures
  • Lowpass-filter tracking data
  • Slicing and selection methods
  • Plot pitches and tracking data

Models and Metrics

  • Centroids
  • Distances, Velocities, Accelerations
  • Metabolic Power and Equivalent Distances
  • Approximate Entropy

Installation

The package can be installed easily via pip:

pip install floodlight

Documentation

You can find all documentation here.

Contributing

Contributions

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.

Citing

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

@misc{Raabe2022floodlight,
  doi = {10.48550/ARXIV.2206.02562},
  url = {https://arxiv.org/abs/2206.02562},
  author = {Raabe, Dominik and Biermann, Henrik and Bassek, Manuel and Wohlan, Martin and Komitova, Rumena and Rein,
           Robert and Groot, Tobias Kuppens and Memmert, Daniel},
  title = {floodlight -- A high-level, data-driven sports analytics framework},
  publisher = {arXiv},
  year = {2022},
}

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.

About

This project has been kindly supported by the Institute of Exercise Training and Sport Informatics at the German Sport University Cologne under supervision of Prof. Daniel Memmert.

Related Projects

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

floodlight-0.3.2.tar.gz (72.8 kB view details)

Uploaded Source

Built Distribution

floodlight-0.3.2-py3-none-any.whl (89.9 kB view details)

Uploaded Python 3

File details

Details for the file floodlight-0.3.2.tar.gz.

File metadata

  • Download URL: floodlight-0.3.2.tar.gz
  • Upload date:
  • Size: 72.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.8.7 Windows/10

File hashes

Hashes for floodlight-0.3.2.tar.gz
Algorithm Hash digest
SHA256 6a405573708405024aa3ac93626a7a7e6abf2c9e3ac06e41ffc53fc6269dd75e
MD5 f13552ed1ea5ea21c73c9b6fe4b3c49f
BLAKE2b-256 a74d550cc036db0550b102b981167cbda40e303843fdeb37ce338d1314f721bb

See more details on using hashes here.

File details

Details for the file floodlight-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: floodlight-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 89.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.8.7 Windows/10

File hashes

Hashes for floodlight-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5bec9348ebb057f9205627a540a3f973b3e55ae4b5e4c243907a0f77123b4983
MD5 d526db40e9a526533c2e07aec5d051c7
BLAKE2b-256 dfcc6dbdd48e60c88963ef436266dfc3061cb0a676ebe0e6900e354ed6609284

See more details on using hashes here.

Supported by

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