Skip to main content

unravelsports logo

Powered by PySport Powered by PySport tl;dr legal

🌀 pip install unravelsports

🌀 What is it?

The unravelsports package aims to aid researchers, analysts and enthusiasts by providing intermediary steps in the complex process of turning raw sports data into meaningful information and actionable insights.

🌀 Features

⚽ Convert positional soccer data into graphs to train graph neural networks by leveraging the powerful Kloppy data conversion standard and Spektral - a flexible framework for training graph neural networks.

⚽ Randomize and split data into train, test and validation sets along matches, sequences or possessions to avoid leakage and improve model quality.

⚽ Train, validate and test your (custom) Graph model(s) and easily predict on new data.

⚽ Leverage the power of Kloppy standardization and unravelsports to execute the these features for Metrica, Sportec, Tracab (CyronHego), SecondSpectrum, SkillCorner and StatsPerform tracking data.

⌛ More to come soon...!

🌀 Quick Start

📖 The Quick Start Jupyter Notebook explains how to convert any positional tracking data from Kloppy to Spektral GNN in a few easy steps while walking you through the most important features and documentation.

📖 The Graph Converter Tutorial Jupyter Notebook gives an in-depth walkthrough.

🌀 Documentation

For now, follow the Graph Converter Tutorial, more documentation will follow!

Additional reading:

📖 A Graph Neural Network Deep-dive into Successful Counterattacks {A. Sahasrabudhe & J. Bekkers, 2023}

🌀 Installation

The easiest way to get started is:

pip install unravelsports

Due to compatibility issues unravelsports currently only works on Python 3.11 with:

spektral==1.20.0 
tensorflow==2.14.0 
keras==2.14.0
kloppy==3.15.0

These dependencies come pre-installed with the package. It is advised to create a virtual environment.

This package is tested on the latest versions of Ubuntu, MacOS and Windows.

🌀 Contributing

All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome.

An overview on how to contribute can be found in the contributing guide.

🌀 Citation

If you use this repository for any educational purposes, research, project etc., please reference both:

📎 The unravelsports package.

BibTex
@software{unravelsports2024repository,
  author = {Bekkers, Joris},
  title = {unravelsports},
  version = {0.1.0},
  year = {2024},
  publisher = {GitHub},
  url = {https://github.com/unravelsports/unravelsports}
}

📎 Sahasrabudhe, A., & Bekkers, J. (2023). A graph neural network deep-dive into successful counterattacks. MIT Sloan Sports Analytics Conference.

BibTex
@inproceedings{sahasrabudhe2023graph,
  title={A Graph Neural Network deep-dive into successful counterattacks},
  author={Sahasrabudhe, Amod and Bekkers, Joris},
  booktitle={17th Annual MIT Sloan Sports Analytics Conference. Boston, MA, USA: MIT},
  pages={15},
  year={2023}
}

and let me know on

alt_text alt_text

🌀 Licenses

This project is licensed under the Mozilla Public License Version 2.0 (MPL), which requires that you include a copy of the license and provide attribution to the original authors. Any modifications you make to the MPL-licensed files must be documented, and the source code for those modifications must be made open-source under the same license.

Metadata

Release files for unravelsports 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unravelsports 0.1.2
File Size Uploaded
unravelsports-0.1.2.tar.gz 33.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for unravelsports 0.1.2
File Interpreter ABI Platform
unravelsports-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 105.3 kB

Release files / unravelsports-0.1.2.tar.gz

Download URL unravelsports-0.1.2.tar.gz
Size 33.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bb0ca7a56608d867b1a20d21daa3e53667e2a528b824ed69c909bffe6d401ca8
BLAKE2b-256 checksum
How to use checksums
694099aae62ab44e47adef3404ebf8c1f3e54e891303b5b6a7934a5ce572398d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.9

Release files / unravelsports-0.1.2-py3-none-any.whl

Download URL unravelsports-0.1.2-py3-none-any.whl
Size 72.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
73a601f1df283d8027a17d2306d7882687d68f16f6be2d03a24fe3ff6402b61e
BLAKE2b-256 checksum
How to use checksums
456b3552c82b70fd8f6cd5c843bb968d13ea7e0eedef25ea1806c9532a1ac16f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.9

Release history Release notifications | RSS feed

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

This release

0.1.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page