This repository contains a Python notebook that analyzes Bayer Leverkusen's performance using open StatsBomb data. The notebook covers various aspects such as defensive and attacking performance, player statistics, and visualizations including radar plots and formation diagrams.
-
Data Source:
The analysis uses free datasets from StatsBomb (see StatsBomb Data). -
Notebook Highlights:
- Defensive analysis and metrics (clearances, tackles, interceptions, blocks)
- Attacking metrics and player performance
- Visualization techniques like radar plots and pitch formations
Happy analyzing!
-
Create a Virtual Environment
Open your terminal and navigate to the project folder. Then run:python3 -m venv .venv
-
Activate the Virtual Environment
-
On macOS/Linux:
source .venv/bin/activate -
On Windows:
.venv\Scripts\activate
-
-
Install Requirements
Make sure you have arequirements.txtfile. Then install the required packages:pip install -r requirements.txt
If you encounter any problem, this is the list of the important packages to install:
- statsbombpy
- pandas
- mplsoccer
- flagpy
- numpy
- scikit-learn
- matplotlib
-
Run the Notebook
Launch Jupyter Notebook or JupyterLab:jupyter notebook
or
jupyter lab
Open the
BayerLev_DataAnalysis.ipynbnotebook to start exploring the analysis.