๐โฝ A collection of football analytics projects, data, and analysis by Edd Webster (@eddwebster), including a curated list of publicly available resources published by the football analytics community.
Edd Webster Football Analytics
A space for football analytics projects by Edd Webster, including a curated list of publicly available resources published by the football analytics community

๐ About This Repository and Author
The README of this repository is a resources guide of learning materials, data sources, libraries, papers, blogs, , etc., created by all those that have made contributions to the open source football analytics community. This GitHub repository and resources list is always a work in progress, with new resources added semi-regularly.
If you like the repo, please feel free to give it a โญ (top right). Cheers!
For more information about this repository and the author, see the following:

๐ Table of Contents
Table of Contents

๐ Getting Started
โ Dependencies
The code in this repository is written in a mix of both Python and R. Before you begin, ensure that you have the following prerequisites installed:
- Python (ideally 3.6.1+ installed)
- R (ideally 4.0.4+ installed)
- The following Python and R libraries...
๐ Python
General Python data science libraries:
-
NumPyfor multidimensional array computing; -
pandasfor data analysis and manipulation; -
matplotlibandSeabornfor data visualisation; and -
scitkit-learnandSciPyfor Machine Learning.
-
kloppy- a package for standardising tracking and event data by Koen Vossen and Jan Van Haaren. See the YouTube tutorial [link] -
floodlightby floodlight-sports - 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. See the following documentation [link] -
matplotsoccer- a Python library for visualising soccer event data by Tom Decroos -
mplsoccer- a Python library for plotting football pitches in matplotlib by Andrew Rowlinson -
PySportincludingPySport Soccer- collection of open-source sport packages including many of those mentioned in this section, by Koen Vossen -
ScraperFCby Owen Seymour - a Python package to scrape data from FiveThirtyEight data, FBref, Understat, Club Elo, Capology and TransferMarkt. Previously scraped Opta event data through the WhoScored? match center (functionality now removed but see old versions and GitHub repos to find this code) -
statsbombapi- a Python API wrapper and dataclasses for StatsBomb data -
statsbombpy- a Python library written by Francisco Goitia to access StatsBomb data -
socceraction- a Python library for valuing the individual actions performed by soccer players. Includes an Expected Threat (xT) implementation by Tom Decroos et. al. -
soccerxgby ML KU Leuven- a Python package for training and analyzing expected goals (xG) models in football -
soccerdata- scrape soccer data from Club Elo, ESPN, FBref, FiveThirtyEight, Football-Data.co.uk, SoFIFA and WhoScored by Pieter Robberechts -
tyronemingsby FCrSTATS - a Python TransferMarkt webscraper
ยฎ๏ธ R
General R data science libraries:
- tidyverse
-
ggsoccerby Ben Torvaney - a soccer visualisation library in R -
ggshakeRby Abhishek Mishra - an analysis and visualisation R package that works with publicly available soccer data. See the following documentation [link] -
StatsBombR- an R package to easily stream StatsBomb data from the API using your log in credentials or from the Open Data GitHub repository cost free into R -
soccermaticsby Joe Gallagher - an R package for the visualisation and analysis of soccer tracking and event data -
worldfootballRby Jason Zivkovic - a R package for extracting world football (soccer) data from FBref, TransferMarkt, Understat and fotmob (see guide on how to use this package [link])

๐ต Repository Structure
The contents of this GitHub repository is organised as follows:
๐ eddwebster/football_analytics/ โก๏ธ central repository of code and analysis by Edd Webster ๐โฝ โ โโโ ๐ dashboards/ โก๏ธ store of Tableau dashboards used for analysis ๐๐ โ โโโ ๐ data/ โก๏ธ a selection of raw and processed data extracts by various providers ๐พ๐ โ โโโ ๐ capology โ โโโ ๐ davies โ โโโ ๐ elo โ โโโ ๐ fbref โ โโโ ๐ fifa โ โโโ ๐ guardian โ โโโ ๐ metrica-sports โ โโโ ๐ opta โ โโโ ๐ reference โ โโโ ๐ sb โ โโโ ๐ shots โ โโโ ๐ stats-perform โ โโโ ๐ stratabet โ โโโ ๐ tm โ โโโ ๐ touchline-analytics โ โโโ ๐ twenty-first-group โ โโโ ๐ understat โ โโโ ๐ wyscout โ โโโ ๐ docs/ โก๏ธ store of documentation for different vendors ๐๐ โ โโโ ๐ centre-circle โ โโโ ๐ metrica-sports โ โโโ ๐ opta โ โโโ ๐ sb โ โโโ ๐ shots โ โโโ ๐ stratabet โ โโโ ๐ wyscout โ โโโ ๐ fonts/ โก๏ธ store of custom and externally acquired fonts used for data visualisation โ๏ธ๐ โ โโโ ๐ .gitignore โก๏ธ ignore unnecessary files for version control with Git ๐ซ๐ค โ โโโ ๐ img/ โก๏ธ store of images used for analysis including club badges, vendor logos and official media images ๐ท๐พ โ โโโ ๐ club_badges/ # badges for football clubs โ โโโ ๐ edd_webster/ # images related to Edd Werbster โ โโโ ๐ fig/ # generated figures derived from analysis and reports in this repository โ โโโ ๐ gif/ # GIF images โ โโโ ๐ memes/ # memes โ โโโ ๐ pitches/ # images of football pitches and goals used mostly for Tableau visualisation โ โโโ ๐ players/ # images of football players โ โโโ ๐ vendors/ # logos for data vendors e.g. StatsBomb โ โโโ ๐ vizpiration/ # high-quality visualisations and analysis from renowned members of the football analytics community โ โโโ ๐ websites-blogs/ # logos for data analysis websites and blogs e.g. Club Elo โ โโโ ๐ scripts/ โก๏ธ store of libraries and Python and open source code ๐๐ โ โโโ ๐ notebooks/ โก๏ธ Jupyter notebooks for exploration and visualisation โ โโโ ๐ README.md โก๏ธ project description and setup guide for better structure and collaboration ๐๐ค โ โโโ ๐ research/ โก๏ธ central repository of research and publicly available resources in football analytics ๐โฝ โ โโโ ๐ documents/ # documents โ โโโ ๐ papers/ # published academic papers and literature โ โโโ ๐ slides/ # PowerPoint slides for published research โ โโโ ๐ video/ โก๏ธ store of videos used or generated for analysis ๐ฅ๐พ

๐ Source Code and Notebooks
The code in this repository is mostly written in Jupyter notebooks or Python scripts, organised in the following workflow:
- Webscraping
- Data Parsing
- Data Engineering
- Data Unification
- Data Analysis - projects include working with Tracking data, constructing VAEP models (as introduced by SciSports), building xG models using Logistic Regression, Random Forests and Gradient Booested Decision Tree algorithms such as XGBoost, and analysing player similarity using PCA and K-Means clustering.

:bookmark_tabs: Resources
:bookmark: Other Football Analytics Resources Guides
Credit to the following resources that were all used to plug gaps in this resources guide once it was published:
-
analytics-handbookGitHub repo by Devin Pleuler- a GitHub repo for getting started in soccer analytics -
awesome-footballby football.db (Gerald Bauer) - a collection of awesome football datasets -
awesome-football-analyticsby Diego Pastor -
awesome-soccer-analyticsby Matias Mascioto -
guideRby Dom Samangy - a Google spreadsheet with 200+ R resources, 100+ Python tutorials, 30+ packages, 25+ accounts to follow, 10 cheatsheets, and several free books & blogs. GitHub repo [link] - Jan Van Haaren's Soccer Analytics Reviews:
-
soccer-analytics-resourcesGithub repo by Jan Van Haaren

:runner: Getting Started with Football Analytics
Good resources for those new for the use of data in football:
- Articles and blog posts:
- GitHub repositories:
soccer-analytics-handbook by Devin Pleuler
+ awesome-football-analytics by Diego Pastor
+ awesome-soccer-analytics by Matias Mascioto
+ soccer-analytics-resources by Jan Van Haaren
- Twitter threads:
- LinkedIn Posts:
- Videos:
- Glossaries:
- Podcasts:

๐พ Data
:information_source: Data Sources
Publicly available data sources and datasets relating to football, from Tracking data, Event data, aggregated player performance data, detailed match statistics, injury records and transfer values, and more.
Data sources that have been used in the code and analysis in this repository can be found in the data subfolder of this repository or in Google Drive (due to GitHub's 100mb file limit) [link]. All code however in this repository should enable you to scrape, parse, and engineer the datasets as per the output used for analysis and visualisations featured.
To learn more about the different types of data available, such as Event and Tracking data, see the "Where can I get data?" section of Devin Pleuler's socceranalyticshandbook [link].
For a quick primer of the free football data resources available, see the following Twitter thread by James Nalton [link].
Event data
Event Data is labelled data for each on-the-ball event that takes place during a game. The data is manually collected from television footage. To learn more about the data collection, see the following video [link].
Each match of event data has around 2-3 thousand individual events (rows), depending on the provider.
The main providers of this data are StatsBomb, Stats Perform (formally Opta), and Wyscout.
| Name | Comments | Source / method(s) to get the data | | ----- | -------- | ----------------------------- | | StatsBomb Open Data |
- 360 data for UEFA Men's Euro 2020 and UEFA Women's Euro 2022
- Event data for the FA Women's Super League (18/19-20/21), The Lionel Messi Data Biography (04/05-19/20), Arsenal Invincibles Season (03/03), UEFA Men's Champions League (99/00-18/19), FIFA Men's 2018 World Cup, FIFA Women's 2019 World Cup, and NWSL 2018 | StatsBomb Open Data GitHub Repo | | StrataData by StrataBet | Chance shooting data provided | No longer made available (since 2018), however, it can be found in GitHub repos of old analysis (including this one) [link]. | | Soccer Video and Player Position Dataset | Dataset of elite soccer player movements and corresponding videos, made available by the University of Oslo. See the accompanying paper [link] | [Link] (appears to no longer be working) | | Opta | Event data for 20+ leagues including the 'Big 5' European leagues, some of which go back to the 09/10 season, | Data available through scraping WhoScored? Match Centre through the following methods:
soccerdatalibrary by Pieter RobberechtsScraperFClibrary by Owen Seymour (functionality no longer available but can be found in old code on GitHub)- The method in the following blog post by Karol Dziaลowski - Football Data Visualizations - Passing Networks. This blog post on how to create passing networks from first principles, using Opta Event data acquired from WhoScored, with the subsequent data visualised using matplotlib.
- | | Opta (11/12 sample dataset) | Match-by-match aggregated player performance data for the 11/12 season and F24 Event data for a 11/12 match of Manchester City vs. Bolton Wanders as part of the #mcfcanalytics initiative | No longer made available (since 2012), however, it can be found in GitHub repos of old analysis (including this one). | | Understat | Shooting and meta data including xG values for the 'Big 5' European leagues and Russian Premier League | This data can be accessed through the following:
- Scraping
- Python packages
ScraperFCby Owen Seymourunderstatby Amos Bastian (see the following for docs [link])scraping-understat-datasetby Douglas Carriรณn- R packages
understatrpackageworldfootballRpackage by Jason Zivkovic (see guide [link])- For download (made available by the following contributors):
- Abrar via Kaggle
- Sagnik Das, using code created by both him and Mark Wilkins - see [link] for shot data, [link] for meta data, and Mark's Tweet [link])
- Men's competitions
- English Premier League
- Spanish La Liga
- German Bundesliga
- French Ligue 1
- Italian Serie A
- Dutch Eredivisie
- Portuguese Primeira Liga
- Brazilian Serie A
- Mexican Liga MX
- MLS
- English Championship
- Champions League
- Europa League
- Conmebol Copa Libertadores
- World Cup
- Euros
- Copa America
- Women's competitions
- American NWSL
- English Super League
- Australian A-League
- French Division 1 Feminine
- German Frauen-Bundesliga
- Italian Serie A
- Spanish Liga F
- Women's Champions League
- World Cup
- Euros
- Current solutions
- Python
ScraperFCby Owen Seymoursoccerdatalibrary by Pieter Robberechts- R
- Jason Zivkovic 's
worldfootballRpackage (see guide [link]) - Google Sheets
- Rob Carroll's YouTube tutorial [link]
- Archived solutions
- Python
- The FBref Player Stats Web Scraping notebook in this GitHub repo. Data is also saved as CSV files in data subfolder
Scrape-FBref-databy Parth Athale, which in turn was written using code from Christopher Martin's repository- Every FBref metric for every 2020-21 Big 5 European league player by Ronan, see [link], [link] and [Tweet]. A 'tidied' version have been made by goaltergeist, see [link]
- 2,823 players in Europe's top 5 leagues on FBref, with their positions as listed on Transfermarkt by Rahul Iyer, see [link] and [Tweet]
- API
soccerdatalibrary by Pieter Robberechtsclub-rankingsby Tony ElHabr - historical daily Opta Power Rankings and FiveThirtyEight Global Club Soccer Rankings- Webpage
- CSV
- GitHub repo
club-rankingsby Tony ElHabr - historical daily Opta Power Rankings and FiveThirtyEight Global Club Soccer Rankings- R
worldfootballRpackage by Jason Zivkovic (see guide [link
Tracking data
Tracking Data records the x and y coordinates of every player on the field, as well as the ball, a number of times per second (usually 10-25). For this reason, the dataset is quite large, much larger than event data at around 2-3 million rows per game.
The data is collected by cameras installed in a stadium and is therefore not widely available, with teams usually only having access to the data in their own league.
The main providers of this data are Second Spectrum, STATS Perform, Metrica Sports, and Signality.
| Name | Comments | Source / method(s) to get the data | | ----- | -------- | ----------------------------- | | Last Row Tracking-like data by Ricardo Tavares | Tracking-like data collected by Ricardo Tavares. See the Liverpool Analytics Challenge for which this data was used (winners discussed on Friends of Tracking [link]). | GitHub repo | | Metrica Sports Sample Tracking and corresponding Event data | Three sample matches of synced event and tracking data. For code to work with this data including Pitch Control modellng, see the
LaurieOnTrackingGitHub repo by Laurie Shaw and the corresponding Friends of Tracking tutorials. | GitHub repo | | Signality Tracking data | Three matches of tracking data from the Allsvenskan - Hammarby vs. IF Elfsborg (22/07/2019), Hammarby 5 vs. 1 Oฬrebroฬ (30/09/2019), and Hammarby vs. Malmoฬ FF (20/10/2019). | This data was made available as part of the 2020 Mathematical Modelling of Football course. The password to download the data is not publicly available, but can be found in the Uppsala Mathematical Modelling of Football Slack group [link]. For access, contact Novosom Salvador Twitter and rsalvadords@gmail.com, or feel free to contact myself. Note, that the 2nd half of the Hammarby-รrebro match is incomplete. |
Broadcast Tracking data
Broadcast Tracking is collected from broadcast footage using computer vision techniques. Unlike in-stadium tracking data, the dataset is not complete and missing players out of shot of the broadcast footage. However, the great benefit is that the data collected is much cheaper and the coverage for what leagues are available is much greater which is extremely useful for tasks such as recruitment analysis.
The main providers of this data are SkillCorner and Sportlogiq.
| Name | Comments | Source / method(s) to get the data | | ----- | -------- | ----------------------------- | | SkillCorner broadcast Tracking data | 9 matches of broadcast tracking data, including matches from 2019/2020 for the league champions and runners up in English Premier League, French L1, Spanish LaLiga, Italian Serie A and German Bundesliga. To find out more about broadcast tracking data and its use cases, see the following Medium article [link]. | GitHub repo |
Aggregated Player/Team Performance data
| Name | Comments | Source / method(s) to get the data | | ----- | -------- | ----------------------------- | | DAVIES modelling data | Estimated player evaluation data by Sam Goldberg and Mike Imburgio for American Soccer Analysis. To learn more about DAVIES, see the following blog post [link]. | Shiny App | | FBref season-on-season aggregated player performance data provided by StatsPerform. | Aggregated player performance data for the following competitions:
Team Rating data
| Name | Comments | Source / method(s) to get the data | | ----- | -------- | ----------------------------- | | Elo club rankings | Elo ratings for club football based on past results to allow for estimation of each club's strength, allowing predictions for the future. | Data available through:
Physical data
| Name | Comments | Source / method(s) to get the data | | ----- | -------- | ----------------------------- | | Bundesliga physical data | Bundesliga player stats, powered by AWS | Link (not scraped into a CSV) |
Results and Match Sheet data
| Name | Comments | Source / method(s) to get the data | | ----- | -------- | ----------------------------- | | 2018 FIFA World Cup Rosters | Goals, caps, club, and date of birth for players on 2018 FIFA World Cup rosters. Source: data.world | Excel | | engsoccerdata | English and European soccer results 1871-2017 | GitHub repo | | FIFA World Cup Match Results | Matchups and results of FIFA World Cup matches from 1930 - 2014. Source: data.world | Excel | | FotMob | Dataset including team and play stats including xG and post-shot xG. | This data can be scraped using: