Independent project: Full-stack data and ML application
F1 Race Intelligence: podium predictions and telemetry
A Formula 1 platform with three parts: podium probabilities predicted before the weekend and again after qualifying, a race dashboard with a telemetry duel between two drivers, and a data assistant that answers only through controlled queries against the app's own database.
What it is
Podium prediction is easy to get wrong by letting the future leak into the features. The model here is trained at two fixed cutoffs: before free practice, using only form, team results and venue history, and after the official starting grid is published, which adds qualifying position, grid slot and the gap to pole.
The race dashboard compares tyre pace and degradation across a session and overlays two drivers' telemetry interpolated onto a common distance axis. Models are compared by chronological backtest and the Brier score, against a qualifying-slot baseline and a recent-form baseline, and the project's 16 pytest tests cover features, models, telemetry, data quality and the assistant.
My part
I built the data pipelines, the prediction models, the API and the web app.
Independent project.
Stack
- Python
- FastAPI
- PostgreSQL 16
- XGBoost
- Parquet
- Next.js 14
- Recharts
- Docker Compose
What is inside
Ingestion pipelines feed PostgreSQL and Parquet; a time-safe feature builder feeds the models; a FastAPI service backs the Next.js app and the assistant.
01
Ingestion
Official results and qualifying come from the Jolpica F1 API, and lap and 20 Hz car telemetry from FastF1 and OpenF1, with quality checks before loading into relational tables and Parquet traces.
02
Time-safe features
Rolling form, team form, circuit history and, after qualifying, grid features are built strictly from data before each race's cutoff.
03
Models and backtests
A qualifying-slot baseline, a recent-form baseline, a calibrated logistic regression and a calibrated XGBoost model are compared with chronological backtests and the Brier score.
04
Tool-calling assistant
The assistant can call a fixed set of functions, such as driver form before a cutoff, and answers from their results. It does not run free queries.