A dual-interface, professional-grade Formula 1 telemetry and race analysis pit wall dashboard. Powered by FastF1, FastAPI, React (Vite), Streamlit, and Plotly to deliver a real-time data experience.
- Dynamic Speed Maps: High-fidelity track layouts displaying full-throttle (Green) vs. braking zones (Red).
- ** DRS & Sector Analysis:** Interactive track visualization overlaying DRS activation zones and micro-sector timing deltas.
- Driver Telemetry Traces: Plot Speed, Throttle, Brake, Gear, RPM, and DRS overlays.
- Delta-T Analysis: Live time-difference charts to pinpoint exactly where one driver is gaining or losing time relative to another.
- Replay Playback Control: Play, pause, and adjust speed to replay driver positions moving dynamically across the track layout.
- Tyre Stint Strategy: Detailed visualizations of stint lengths, tyre compounds (Soft, Medium, Hard, Wet, Intermediate), and tyre degradation.
- Pit Stop Analysis: Overview of pit stop durations and execution times.
This repository offers two independent ways to view the data:
┌──────────────────────────────────────────────┐
│ FastF1 Data │
└──────────────────────┬───────────────────────┘
│
┌─────────────────────┴─────────────────────┐
▼ ▼
┌───────────────────────┐ ┌───────────────────────┐
│ Streamlit App │ │ FastAPI Backend │
│ (Single-page Py) │ │ (REST APIs + Cache) │
└───────────────────────┘ └───────────┬───────────┘
│
▼
┌───────────────────────┐
│ React Frontend │
│ (Vite + TS + CSS) │
└───────────────────────┘
- Option A: Streamlit Standalone Dashboard: Quick, powerful, interactive Python-native telemetry dashboard.
- Option B: Full-Stack React + FastAPI Web App: Modern, state-of-the-art multi-view dashboard with a Python API backend.
Clone the repository and copy the environment template:
cp -n .env.example .envTo run the quick standalone Streamlit dashboard:
./run_dashboard.shAccess in browser at http://localhost:8501
Run the backend and frontend in separate terminals:
-
Terminal 1 (FastAPI Backend):
source .venv/bin/activate uvicorn f1dash.main:app --host 127.0.0.1 --port 8000 --reload(Interactive Swagger API docs available at http://127.0.0.1:8000/docs)
-
Terminal 2 (React Frontend):
cd frontend npm --prefix . run dev
Access the web app in browser at http://localhost:5173
copy .env.example .env- PowerShell:
.venv\Scripts\Activate.ps1 streamlit run src\f1dash\dashboard.py
- Command Prompt:
.venv\Scripts\activate.bat streamlit run src\f1dash\dashboard.py
- Terminal 1 (FastAPI Backend):
.venv\Scripts\Activate.ps1 uvicorn f1dash.main:app --host 127.0.0.1 --port 8000 --reload
- Terminal 2 (React Frontend):
cd frontend npm --prefix . run dev
All telemetry, timing, and tyre compound data is fetched from the official F1 live timing and Ergast API via the FastF1 library.
- FastF1 downloads are cached locally in
.cache/fastf1/to speed up subsequent queries. - Precomputed session snapshots are exported to
exports/to keep UI render times fast. - Includes an optional Redis cache layer.