Skip to content

BenjaminLarrousse/statsbomb-messi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Is it possible to defend against Messi? A data perspective.

Python code associated to my blog post about Messi: Is it possible to defend against Messi?.

Content

This repo contains code for analysing Messi Data Biography.

It contains folders for Jupyter notebooks, data, and figures.

Notebooks

My analysis is composed of several notebooks. You can find the complete list below, with a small description.

Notebooks Description
01-data_loading Load Statsbomb data from local or github and do some preprocessing.
02-data_exploration Explore Messi data and visualize some stats (goals, winning %, etc.)
03-Defense_analysis Focus on the question "How to defend against Messi?". Exploration of Espanyol-Barcelona 2009/2010
04-VAEP_with_atomic-spadl Use atomic-spadl to use the VAEP metric
05-xT_with_atomic-spadl Use atomic-spadl to use the xThreat metric
06-EXTRA-advanced_messi_stats Data vizualisation of some advance metrics
atomic-spadl_1-load-and-convert-statsbomb-data Notebook from atomic-spadl
atomic-spadl_2-compute-features-and-labels Notebook from atomic-spadl
atomic-spadl_3-estimate-scoring-and-conceding-probabilities Notebook from atomic-spadl
Utility_functions Utility functions for data vizualisation and calculate advance stats
unit_test Test of one utility function with pytest

N.B.: make sure the atomic folder of socceraction is at the same level as this project if you want to use the associated notebooks.

Interactive visualization

List of visualization.

General

All static images can be found here: https://github.com/BenjaminLarrousse/statsbomb-messi/tree/master/figures

Visualization Description
Win/draw/loss FC Barcelona Win/draw/loss distribution of FC Barcelona with Messi (2004-2019).
Win/draw/loss Messi Win/draw/loss distribution depending on Messi scoring or assisting.
Messi goals and assists Number of games with goal, assist, or both.
Goals and assists involvement Percentage of games without goals or assists, by season.
Messi xG distribution Distribution of xG depending on goals or assists.
Messi VAEP values by season Messi VAEP outputs by season.
VAEP distribution VAEP distribution on the complete Messi dataset.
VAEP vs xG Correlation between xG and VAEP for Messi.

Derby Espanyol/Barcelona

All static images can be found here: https://github.com/BenjaminLarrousse/statsbomb-messi/tree/master/figures/derby

Visualization Description
VAEP Distribution (2009/10) VAEP distribution, season 2009/10, and derby value.

Messi Advanced stats

Visualization Description
Completed passes inside the box Messi completed passes inside the box, normalized per 90. By season.
Completed passes into the box Messi open play completed passes into the box, normalized per 90. By season.
Completed throughballs Messi completed throughballs, normalized per 90. By season.
Key passes Messi open play key passes, normalized per 90. By season.
xG assisted Messi xG assisted, normalized per 90. By season.

Contact

For further information, please contact me on Twitter: @BLarrousse

About

Deep dive into Statsbomb's Messi data biography

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages