End-to-end football analytics project combining exploratory analysis, machine learning, and business intelligence to study European football performance using the Transfermarkt dataset.
Final capstone project of the Workintech Data Scientist & AI Program, developed by a team of four. The project analyzes European football data from Transfermarkt across 14 leagues and 389 teams, delivering two interconnected analytical tracks plus a machine-learning prediction layer on top.
This was a 4-person team project. I personally led two of the analytical tracks:
| Track | Lead | Notebook | Dashboard Score |
|---|---|---|---|
| 💰 Squad Value vs. Team Success | Uğur Batuhan Tuna (me) | 01_eda_squad_value/KadroDegeri_vs_Basari.ipynb |
9.3 / 10 |
| ⚽ Match Result Prediction | Uğur Batuhan Tuna (me) | 02_eda_match_prediction/ + 03_ml_match_predictor/ |
10 / 10 |
| 📊 [Track 3 name] | [Teammate name / @github] | — | — |
| 🎯 [Track 4 name] | [Teammate name / @github] | — | — |
This repository contains the tracks I led. The data was sourced from Transfermarkt.
transfermarkt-analytics/
│
├── 📁 notebooks/
│ ├── 01_eda_squad_value/
│ │ └── KadroDegeri_vs_Basari.ipynb # EDA + squad value vs success analysis
│ ├── 02_eda_match_prediction/
│ │ └── eda_match_prediction.ipynb # Data prep for the ML model
│ └── 03_ml_match_predictor/
│ └── MacTahminiwithPredictor_Model.ipynb # ML training + predict_match() demo
│
├── 📁 data/
│ ├── raw/ # Raw Transfermarkt data
│ ├── processed/ # Cleaned dataset for the ML model
│ └── README.md
│
├── 📁 dashboards/
│ ├── KadroDegeriVsBasariFinalVersionDone.pbix
│ ├── Match_Prediction.pbix
│ └── *.png # Dashboard screenshots
│
├── 📁 docs/
│ ├── sunum_rehberi.md # Presentation guide
│ └── mac_tahmini_ozet.md # Match prediction technical summary
│
├── 📄 requirements.txt
├── 📄 .gitignore
├── 📄 LICENSE
└── 📄 README.md
Data & Cloud
- Google BigQuery — backup of the raw Transfermarkt dataset
- Google Colab — notebook environment
Python
pandas,numpy— data manipulationscikit-learn— ML models (Logistic Regression, Random Forest)matplotlib,seaborn— plots inside notebooks
Visualization
- Power BI Desktop — interactive dashboards
Collaboration
- GitHub, Trello
┌─────────────────────────────┐
│ Raw Transfermarkt Data │
└──────────┬──────────────────┘
│
┌─────────────┴──────────────┐
│ │
▼ ▼
┌───────────────────┐ ┌────────────────────┐
│ 01 EDA │ │ 02 EDA │
│ Squad Value vs │ │ Match Prediction │
│ Success │ │ (data prep) │
└─────────┬─────────┘ └──────────┬─────────┘
│ │
▼ ▼
┌───────────────────┐ ┌────────────────────┐
│ Power BI │ │ Processed dataset │
│ Kadro Değeri │ └──────────┬─────────┘
│ Dashboard │ │
└───────────────────┘ ▼
┌────────────────────┐
│ 03 ML Model │
│ MacTahmini with │
│ Predictor │
└──────────┬─────────┘
│
▼
┌────────────────────┐
│ Power BI │
│ Match Prediction │
│ Dashboard │
└────────────────────┘
Question: Do teams with higher squad market values actually win more? Who punches above their weight?
Notebook: notebooks/01_eda_squad_value/KadroDegeri_vs_Basari.ipynb
- Cleaned and joined Transfermarkt squad-value data with league standings across 14 leagues.
- Computed correlation between total squad value and sporting outcomes (points, wins, goal difference).
- Identified outlier clubs — over-performers and under-performers relative to their market value.
- Exported aggregated metrics for the Power BI dashboard.
Overall correlation across 1,353 club-seasons: r = 0.56. Money buys a baseline, but not a ceiling.
How much do teams pay (in €M squad value) for each league point? Premier League is the most expensive at €6.8M/point, Süper Lig the cheapest at €1.4M.
Who delivers value for money, and who spends big for little return?
Project Review Score: 9.3 / 10
Question: Can we predict home-win / draw / away-win from squad value, form, and head-to-head history?
This track is split across two notebooks: one for data preparation, one for the ML model.
Notebook: notebooks/02_eda_match_prediction/eda_match_prediction.ipynb
- Loaded raw match and club data.
- Cleaned, joined, and engineered features:
- Squad market value differential (home vs. away)
- Recent form (rolling points over the last N matches)
- Head-to-head historical record
- Home advantage indicator
- League-level context features
- Wrote the processed dataset to
data/processed/for the ML notebook.
Notebook: notebooks/03_ml_match_predictor/MacTahminiwithPredictor_Model.ipynb
- Loaded the processed dataset.
- Trained and compared Logistic Regression and Random Forest classifiers.
- Evaluated with accuracy, precision/recall, and confusion matrices.
- Exposed a
predict_match(home_team, away_team)function returning probabilities for each outcome.
Across 54,890 matches: 44.4% home wins, 30.5% away wins, 25.1% draws. Home advantage is real and remarkably consistent across seasons.
Which leagues show the strongest home advantage? Süper Lig and La Liga top the list, while Eredivisie sees more away wins than most.
When one team's squad value dominates the other's, the goal difference distribution shifts sharply. A "crushing advantage" (Ezici Üstünlük) predicts a home win 66% of the time.
Project Review Score: 10 / 10
- Python 3.10+
- Power BI Desktop (to open the
.pbixfiles) — download here
git clone https://github.com/ubtuna/transfermarkt-analytics.git
cd transfermarkt-analytics
python -m venv venv
source venv/bin/activate # Linux/Mac/WSL
# venv\Scripts\activate # Windows PowerShell
pip install -r requirements.txtThe notebooks are designed to run in order:
-
Track 1 (standalone):
- Open
notebooks/01_eda_squad_value/KadroDegeri_vs_Basari.ipynb - Make sure
data/raw/is populated (see data/README.md) - Run all cells
- Open
-
Track 2 (two-step):
- First run
notebooks/02_eda_match_prediction/eda_match_prediction.ipynb→ produces a cleaned dataset indata/processed/ - Then run
notebooks/03_ml_match_predictor/MacTahminiwithPredictor_Model.ipynb→ trains the model and exposespredict_match()
- First run
- 📑 Presentation Guide — overview used during the project defense
- 📋 Match Prediction Summary — technical summary of the ML track
Ideas I'd like to explore in a future version:
- Add a
dbtlayer for modular data transformations - Benchmark Random Forest against XGBoost and LightGBM
- Wrap
predict_match()in a simple Streamlit app - Schedule BigQuery refreshes for a live demo
MIT License — see LICENSE for details.
Uğur Batuhan Tuna Data Scientist / Data Analyst | Workintech Graduate | Ex-Capgemini
- 🔗 LinkedIn: linkedin.com/in/ugur-tuna-187504160
- 🐙 GitHub: @ubtuna
- 📧 Email: ubtuna@gmail.com
Built with ☕ and an unreasonable amount of football statistics.





