Skip to content

Commit

Permalink
build: release 0.4.0
Browse files Browse the repository at this point in the history
build: release 0.4.0
  • Loading branch information
draabe authored Feb 3, 2023
2 parents 55a24b7 + e1de087 commit aed684a
Show file tree
Hide file tree
Showing 48 changed files with 4,061 additions and 915 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
python-version: [3.8, 3.9, '3.10']
poetry-version: [1.1.11]

env:
MPLBACKEND: Agg # https://github.com/microsoft/azure-pipelines-tasks/issues/16426

steps:
- name: Check out source repository
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
hooks:
- id: black
language_version: python3
- repo: https://gitlab.com/pycqa/flake8
- repo: https://github.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
Expand Down
32 changes: 30 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,60 @@
# Changelog

## 0.3.3 (2022-08-23)
## 0.4.0 (2023-02-03)

#### New Features

* add discretized voronoi model ([#124](https://github.com/floodlight-sports/floodlight/issues/124))
* add parser for metadata and teamsheets in json format ([#113](https://github.com/floodlight-sports/floodlight/issues/113))
* integrate teamsheet logic to tracab parser ([#112](https://github.com/floodlight-sports/floodlight/issues/112))
* integrate teamsheet logic to secondspectrum parsers ([#111](https://github.com/floodlight-sports/floodlight/issues/111))
* integrate teamsheet logic to statsperform parsers ([#108](https://github.com/floodlight-sports/floodlight/issues/108))
* integrate teamsheet logic to statsbomb parser ([#109](https://github.com/floodlight-sports/floodlight/issues/109))
* integrate teamsheet logic to dfl parser ([#106](https://github.com/floodlight-sports/floodlight/issues/106))
* add sportradar parser ([#110](https://github.com/floodlight-sports/floodlight/issues/110))
* add teamsheets core object ([#103](https://github.com/floodlight-sports/floodlight/issues/103))
* add second spectrum insights parser ([#100](https://github.com/floodlight-sports/floodlight/issues/100))
#### Fixes

* io refactor fixes ([#117](https://github.com/floodlight-sports/floodlight/issues/117))
* set matplotlib backend env in workflows
* replace pandas iterrows ([#96](https://github.com/floodlight-sports/floodlight/issues/96))
* missing https in hyperlink leading to an unknown page when clicking on it in github ([#98](https://github.com/floodlight-sports/floodlight/issues/98))
* MetabolicPower framerate bug ([#93](https://github.com/floodlight-sports/floodlight/issues/93))
* UTF-8 encoding Kinexon parser
* UFT-8 encoding Kinexon parser
* minimum signal length ([#81](https://github.com/floodlight-sports/floodlight/issues/81))
* statsperform pitch templates ([#75](https://github.com/floodlight-sports/floodlight/issues/75))
* adapt dfl parser to different format versions and fix statsperform gameclock unit ([#76](https://github.com/floodlight-sports/floodlight/issues/76))
* pass difference argument to axis-specific differentiation and fix prepend ([#77](https://github.com/floodlight-sports/floodlight/issues/77))
#### Refactorings

* flexible dictionary returns for parser ([#116](https://github.com/floodlight-sports/floodlight/issues/116))
* streamline IO function names ([#115](https://github.com/floodlight-sports/floodlight/issues/115))
#### Docs

* fix butterworth cutoff freq doc ([#94](https://github.com/floodlight-sports/floodlight/issues/94))
* update tutorial matchsheets ([#95](https://github.com/floodlight-sports/floodlight/issues/95))
* update changelog
* add information on setup.py
* update datasets description
* update readme
* update changelog
* add paper reference
#### Others

* bump version
* add dependency pytest-cov
* add dependency coverage
* bump version
* update location of flake8 which was moved from gitlab to github ([#99](https://github.com/floodlight-sports/floodlight/issues/99))
* add coverage reports generation and codecov upload
* update README
* update readme
* update module init
* update columns in tests

Full set of changes: [`0.3.1...0.3.3`](https://github.com/floodlight-sports/floodlight/compare/0.3.1...0.3.3)
Full set of changes: [`0.3.1...0.4.0`](https://github.com/floodlight-sports/floodlight/compare/0.3.1...0.4.0)

## 0.3.1 (2022-06-06)

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Thank you for considering to help with this package! We warmly welcome all kinds

Please also feel encouraged to open an issue (or PR) if you found a bug, have general feedback or if you are unsure whether your new feature would be a good addition.

If all or some of this is new to you, and you would prefer a detailed step-by-step explanation of how to contribute, check out our extended contributing manual in the [documentation](floodlight.readthedocs.io).
If all or some of this is new to you, and you would prefer a detailed step-by-step explanation of how to contribute, check out our extended contributing manual in the [documentation](https://floodlight.readthedocs.io).


Development
Expand Down
65 changes: 38 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,21 @@
[contrib-url]: https://github.com/floodlight-sports/floodlight/blob/main/CONTRIBUTING.md
[arxiv-image]: https://img.shields.io/badge/arXiv-2206.02562-b31b1b.svg
[arxiv-url]: https://arxiv.org/abs/2206.02562
[joss-image]: https://joss.theoj.org/papers/10.21105/joss.04588/status.svg
[joss-url]: https://doi.org/10.21105/joss.04588
[codecov-image]: https://codecov.io/gh/floodlight-sports/floodlight/branch/develop/graph/badge.svg?token=RLY582UBC6
[codecov-url]: https://codecov.io/gh/floodlight-sports/floodlight


# floodlight

[![Latest Version][version-image]][version-url]
[![Python Version][python-image]][python-url]
[![Documentation Status][docs-image]][docs-url]
[![Build Status][build-image]][build-url]
[![Linting Status][lint-image]][lint-url]
[![Codecov][codecov-image]][codecov-url]
[![Code style: black][black-image]][black-url]
[![arXiv][arxiv-image]][arxiv-url]
[![DOI][joss-image]][joss-url]

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

Expand Down Expand Up @@ -88,28 +90,30 @@ To find out more, see the full set of features below or get started quickly with

### 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.
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 (*new*)
- 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)
- **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 (*new*)
- **Sportradar**: Event data (*new*)
- **StatsPerform**: Tracking data, Event data (with URL access)
- **StatsBomb**: Event data

#### Datasets

Expand All @@ -120,15 +124,16 @@ filtering, basic plotting routines and computational models.

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

#### Models and Metrics

- Centroids
- Distances, Velocities, Accelerations
- Metabolic Power and Equivalent Distances
- Approximate Entropy
- Centroids
- Distances, Velocities & Accelerations
- Metabolic Power & Equivalent Distances
- Voronoi Space Control (*new*)

### Installation

Expand All @@ -148,6 +153,8 @@ You can find all documentation [here][docs-url].
### Contributing

[![Contributions][contrib-image]][contrib-url]
[![Code style: black][black-image]][black-url]


Check out [Contributing.md][contrib-url] for a quick rundown of what you need to
know to get started. We also provide an extended, beginner-friendly guide on how to
Expand All @@ -157,17 +164,21 @@ start contributing in our documentation.

### Citing

If you've used *floodlight* in your scientific work, please cite the [corresponding paper][arxiv-url].
If you've used *floodlight* in your scientific work, please cite the [corresponding paper][joss-url].

```
@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},
@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}
}
```

Expand Down
Binary file added docs/source/_img/sample_dvm_plot_hex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_img/sample_dvm_plot_hex_mesh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_img/sample_dvm_plot_square.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_img/tutorial_matchsheets_allgoals.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_img/tutorial_matchsheets_singlegoal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 22 additions & 21 deletions docs/source/guides/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,35 @@ Let's look at a quick example loading Tracab position and Opta event data:

.. code-block:: python
from floodlight.io.tracab import read_tracab_files
from floodlight.io.opta import read_f24
from floodlight.io.tracab import read_position_data_dat
from floodlight.io.opta import read_event_data_xml
filepath_dat = <filepath_to_tracab_dat_file>
filepath_meta = <filepath_to_tracab_metadata_file>
filepath_f24 = <filepath_to_opta_f24_feed>
(
xy_home_ht1,
xy_home_ht2,
xy_away_ht1,
xy_away_ht2,
xy_ball_ht1,
xy_ball_ht2,
possession_ht1,
possession_ht2,
ballstatus_ht1,
ballstatus_ht2,
pitch_xy,
) = read_tracab_files(filepath_dat, filepath_meta)
xy_objects,
possession_objects,
ballstatus_objects,
teamsheets,
pitch_xy
) = read_position_data_dat(filepath_dat, filepath_meta)
(
events_home_ht1,
events_home_ht2,
events_away_ht1,
events_away_ht2,
pitch_events
) = read_f24(filepath_f24)
events_objects, pitch_events = read_event_data_xml(filepath_f24)
The data returned by both parsers is stored in nested dictionaries because the number of match segments can differ (due to overtime). We can unpack some of them to be more explicit:

.. code-block:: python
xy_home_ht1 = xy_objects["HT1"]["Home"]
xy_away_ht1 = xy_objects["HT1"]["Away"]
possession_ht1 = possession_objects["HT1"]
ballstatus_ht1 = ballstatus_objects["HT1"]
events_home_ht1 = events_objects["HT1"]["Home"]
events_away_ht1 = events_objects["HT1"]["Away"]
Sample Data
Expand Down
Loading

0 comments on commit aed684a

Please sign in to comment.