Skip to main content

klop·pen (klopte, heeft geklopt) - juist zijn; overeenkomen, uitkomen met: dat klopt, dat kan kloppen is juist; dat klopt als een zwerende vinger dat is helemaal juist

PyPI Latest Release Downloads Powered by PySport

Soccer Data Processing, Simplified

Each data provider uses its own proprietary formats, event definitions, and coordinate system to capture soccer match data. This lack of standardization makes it difficult to build software or perform analysis across multiple providers. Kloppy solves this challenge by introducing a vendor-independent data model for both event and tracking data. It also streamlines data preprocessing, ensuring seamless integration into your data analysis and video analysis workflows. By standardizing and simplifying access to soccer match data, kloppy aims to be an essential building block for anyone working with soccer data.

Table of Contents

Supported data providers

Kloppy provides support for loading data from the following providers:

Provider Event Data Tracking Data Public Data Docs Notes
DataFactory ✓ ↗
Hawkeye (2D) ✓ ↗ Joint tracking data is not yet supported
Impect ✓ ↗ ↗
Metrica ✓ ✓ ↗ ↗
PFF ⧗ ✓ ↗ ↗
SecondSpectrum ⧗ ✓ ↗
Signality ✓ ↗
SkillCorner ✓ ↗ ↗
Sportec ✓ ✓ ↗ ↗
StatsBomb ✓ ↗ ↗ Includes 360 freeze frame data support
Stats Perform ✓ ✓ ↗ Includes support for MA1, MA3, and MA25 data feeds
Opta ✓ ↗ Includes support for F7, F24 and F73 XML data feeds
Tracab ✓ ↗
Wyscout ✓ ↗ ↗ Includes support for v2 and v3 data

✓ Implemented    ⧗ In progress or partial support

Main features

Here are just a few of the things that kloppy does well.

🗄️ Loading data

Kloppy implements a standardized data model that can load event and tracking data from the most common data providers, supporting both public and proprietary data. Moreover, it does not matter where or how the data is stored: kloppy can handle compressed files and load data directly from the cloud.

from kloppy import sportec

dataset = sportec.load_open_event_data(match_id="J03WMX")

🔍 Querying data

Video analysts spend a lot of time searching for bespoke moments. Often, these moments follow recognizable patterns—like pass, pass, shot. Kloppy provides a powerful search mechanism based on regular expressions, enabling you to find these bespoke moments more quickly and easily.

goals = dataset.filter("shot.goal")

🔄 Transforming data

Different data providers use different coordinate systems, which can make combining datasets challenging. Additionally, it can be convenient to change the orientation of the data or normalize pitch dimensions for specific analyses. Kloppy handles these data transformations seamlessly.

goals_ltr = goals.transform(
    to_coordinate_system="opta",
    to_orientation="ACTION_EXECUTING_TEAM"
)

💾 Exporting data

Once your data is in the right shape, export it as a Polars or Pandas dataframe for efficient analysis, or as SportsCode XML to support your video analysis workflow. Kloppy's data model is also compatible with other popular soccer analytics libraries.

df_goals = goals_ltr.to_df(
  "player", 
  "coordinates_*", 
  assist=lambda event: event.prev("pass"),
  engine="polars"
)

Where to get it

The source code is hosted on GitHub at: https://github.com/PySport/kloppy.

The easiest way to install kloppy is via pip:

pip install kloppy

You can also install from GitHub for the latest updates:

pip install git+https://github.com/PySport/kloppy.git

For more details, refer to the installation guide.

Documentation

The official documentation is hosted at https://kloppy.pysport.org.

Contributing to kloppy

Kloppy can only exist because of a passionate and dedicated open-source community. 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.

Made with contrib.rocks.

Sponsors

Kloppy is powered by PySport (non-profit, RSIN: 866294211). Consider contributing or donating to ensure its longevity!

License

Kloppy is distributed under the terms of the BSD 3 license.

Metadata

Release files for footovision-kloppy 3.19.1.post1

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

Source distribution (sdist)

Source distribution for footovision-kloppy 3.19.1.post1
File Size Uploaded Provenance Actions
footovision_kloppy-3.19.1.post1.tar.gz 41.3 MB Without provenance Details for footovision_kloppy-3.19.1.post1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for footovision-kloppy 3.19.1.post1
File Interpreter ABI Platform Actions
footovision_kloppy-3.19.1.post1-py3-none-any.whl Python 3 none any Details for footovision_kloppy-3.19.1.post1-py3-none-any.whl

Total release size: 73.2 MB

Release files / footovision_kloppy-3.19.1.post1.tar.gz

Download URL footovision_kloppy-3.19.1.post1.tar.gz
Size 41.3 MB
Tags Source
SHA-256 checksum
How to use checksums
4bf594d3a76cde46e8c1c7a1be1ec4ba387808e1a884e5d990478e43707abce5
BLAKE2b-256 checksum
How to use checksums
4b8ff9b228714af6868f599bae16a63f62964664972a48a9d92cccb1a27d163f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":null,"id":"forky","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / footovision_kloppy-3.19.1.post1-py3-none-any.whl

Download URL footovision_kloppy-3.19.1.post1-py3-none-any.whl
Size 32.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
43c5427474027ac3b6c76d0f82dff62c2e17e3196ca4eb6267124e74b4fcc205
BLAKE2b-256 checksum
How to use checksums
429593b19d8f316f63140fa1327332b48a12148d789d3044538242c2eb3730d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":null,"id":"forky","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for footovision-kloppy 3.19.1.post1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.19.1.post1 This release

2 release files No provenance

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