Case Study

F1 2025
Analytics
Dashboard

Real-time telemetry visualization + XGBoost ML model predicting optimal pit stop windows. Built for F1 fans who want to understand race strategy beyond the TV broadcast.

92%
Model Accuracy
XGBoost pit window predictions
<50ms
API Response
FastAPI real-time endpoints
23
Race Tracks
Full 2025 F1 calendar
10M+
Data Points
Telemetry frames processed
The Problem

Strategy Is Invisible to Fans

F1 strategy unfolds in microseconds — tire degradation, fuel loads, undercut windows. Existing tools give you the result, not the prediction. Broadcasters show you who pitted, not why or when they should have.

The Solution

ML-Powered Pit Windows

  • Interactive telemetry overlay using FastF1 API
  • XGBoost model predicting optimal pit windows (92% acc.)
  • Driver vs driver comparison across all 23 race tracks
  • Weather integration affecting strategy recommendations
How It Was Built
01

Data Pipeline

Built ingestion layer using FastF1 API — handles missing telemetry with cubic spline interpolation.

02

Feature Engineering

Extracted 40+ features: lap delta, tire compound degradation rate, fuel load estimates, sector splits.

03

ML Model

XGBoost classifier trained on 3 seasons of historical race data. Hypertuned with Optuna. 92% test accuracy.

04

API Layer

FastAPI endpoints serving predictions in <50ms. Async background tasks for live data refresh every 30s during race weekends.

05

Dashboard

Streamlit UI: telemetry overlay, driver comparison, tire strategy viz, and live pit window predictions.

Tech Stack
Python
Core language
FastF1
Official F1 telemetry API
XGBoost
Pit stop prediction model
FastAPI
Real-time REST endpoints
Streamlit
Interactive dashboard UI
Pandas
Data manipulation & cleaning
Plotly
Interactive telemetry charts
NumPy
Feature engineering

See It Live

The dashboard is publicly deployed on Streamlit Cloud.