ClementeH/statsbomb-open-data-shots
StatsBomb Open Data β Football Shots (xG) 88,023 shot-level football records extracted from StatsBomb Open Data, spanning 67 years of football (1958β2025) across 21 competitions, 48 seasons, 308 teams, and 6,147 players. Includes StatsBomb's own xG values as labels, making this the most complete open football shot dataset available on HuggingFace for training Expected Goals models. Highlights π Lionel Messi β 2,670 shots, the most of any player in the datasetβ¦ See the full description on the dataset page: https://huggingface.co/datasets/ClementeH/statsbomb-open-data-shots.
StatsBomb Open Data β Football Shots (xG)
88,023 shot-level football records extracted from StatsBomb Open Data, spanning 67 years of football (1958β2025) across 21 competitions, 48 seasons, 308 teams, and 6,147 players.
Includes StatsBomb's own xG values as labels, making this the most complete open football shot dataset available on HuggingFace for training Expected Goals models.
Highlights
- π Lionel Messi β 2,670 shots, the most of any player in the dataset (18 La Liga seasons at Barcelona)
- π Historical depth β FIFA World Cup data from 1958 to 2022
- β½ Both genders β FA Women's Super League, Women's World Cup, UEFA Women's Euro included
- π StatsBomb xG labels β use as regression target or benchmark for your own model
- π― Benchmark β A GradientBoosting model trained on this dataset achieves ROC-AUC 0.8047, reaching 98% of StatsBomb's professional xG model performance (ROC-AUC 0.8198) using only 9 features
Dataset Statistics
Coverage by Competition
Splits
Stratified by is_goal to preserve goal rate across splits.
Features
Pitch Coordinates
StatsBomb uses a 120Γ80 coordinate system:
x=0is the defensive goal line,x=120is the attacking goal liney=0is the left touchline,y=80is the right touchline- Goal center is at
(120, 40)
Quick Start
from datasets import load_dataset
ds = load_dataset("ClementeH/statsbomb-open-data-shots")
df = ds["train"].to_pandas()
# All Messi shots
messi = df[df["player"] == "Lionel AndrΓ©s Messi Cuccittini"]
print(f"Messi: {len(messi)} shots, {messi['is_goal'].sum()} goals, mean xG {messi['xg_statsbomb'].mean():.3f}")
# Train a simple xG model
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.preprocessing import LabelEncoder
features = ["x", "y", "distance_to_goal", "angle_to_goal", "under_pressure"]
X = df[features].astype(float)
y = df["is_goal"]
model = GradientBoostingClassifier(n_estimators=200, max_depth=4)
model.fit(X, y)Benchmark: xG Model Performance
A GradientBoosting model trained on this dataset (9 features) vs StatsBomb's professional xG:
The open model reaches 98% of professional xG performance using only position, body part, technique, shot type, and pressure.
See `ClementeH/football-xg` for the trained model (coming soon).
Attribution
Data provided by StatsBomb via [StatsBomb Open Data](https://github.com/statsbomb/open-data). Licensed under CC BY-SA 4.0. You are free to share and adapt this data for any purpose, provided you give appropriate credit to StatsBomb and distribute your contributions under the same license. This dataset was processed and packaged for HuggingFace by ClementeH.
Related Resources
- statsbomb/open-data β original raw JSON data
- statsbombpy β official Python library
- `ClementeH/football-xg` β xG model trained on this dataset (coming soon)
- `ClementeH/football-xg-analyzer` β interactive Space (coming soon)
