Laurie's code for reading and working with Metrica's tracking and event data.
The sample data can be found in Metrica's github repository here: https://github.com/metrica-sports/sample-data
We'll be updating this repo as the friends of tracking series develops, adding code for measuring player velocity and acceleration, measuring team formations, and evaluating pitch control using a model published by Will Spearman.
To create movies from the tracking data you'll need to have ffmpeg installed. You can do this by following the instructions here: https://anaconda.org/conda-forge/ffmpeg (you may need to restart python afterwards).
If you want to run the notebooks for each session, you can either install the repository locally or run it directly on Binder or Google Colab. In case you do not know, use Google Colab!
- Run each cell in the notebook and ignore the warning about the unknown environment.
- The data is downloaded directly from Metricas repository.
- Give it some time when it says "Readining team home" in a cell.
Lesson | Binder | Colab |
---|---|---|
Lesson 4 - Basic Plotting of Event and Tracking Data | ||
Lesson 5 - Advanced Plotting and Summary Statistics | ||
Lesson 6 - Pitch Control |
- Download Anaconda
- Clone repository
- Create environment
fotd-laurie-on-tracking
:
conda env update
- Start jupyter notebook server
jupyter notebook
- Select the kernel
fotd-laurie-on-tracking
for your notebook