An open API service indexing awesome lists of open source software.

https://github.com/driversti/formula1

Formula 1 companion dashboard built on the public live-timing archive — starting with pre-race tyre inventory, more race-weekend insights to follow.
https://github.com/driversti/formula1

data-visualization f1 formula-1 github-pages python react tailwindcss typescript vite

Last synced: 28 days ago
JSON representation

Formula 1 companion dashboard built on the public live-timing archive — starting with pre-race tyre inventory, more race-weekend insights to follow.

Awesome Lists containing this project

README

          

# Formula 1 Dashboard

A companion dashboard for Formula 1 race weekends, built on top of F1's public live-timing archive. The project ingests raw session data, reconstructs what happened on track, and presents it as focused, interactive views for fans who want more than the broadcast shows.

🏁 **Live site:** [driversti.github.io/formula1](https://driversti.github.io/formula1/)

[![Deploy](https://github.com/driversti/formula1/actions/workflows/deploy.yml/badge.svg)](https://github.com/driversti/formula1/actions/workflows/deploy.yml)
[![CI](https://github.com/driversti/formula1/actions/workflows/ci.yml/badge.svg)](https://github.com/driversti/formula1/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)

## Features

- **Pre-race tyre inventory** — for an upcoming Grand Prix, shows each driver's available tyre sets reconstructed from practice and qualifying: which compounds are still fresh, which are scrubbed, and how many laps each set has already seen.

More views are planned as the underlying data pipeline grows — stints, strategy, pace comparisons, and beyond.

## What this repo contains

- **`seasons/`** — download scripts for F1's public live-timing archive (`livetiming.formula1.com/static/`). Nothing under `seasons/20xx/` is checked in; CI fetches the minimum it needs on every build via `make fetch-race`.
- **`precompute/`** — a Python 3.13 pipeline (Pydantic + pytest) that parses raw `.jsonStream` files and emits validated JSON manifests consumed by the frontend.
- **`site/`** — a React 19 + TypeScript + Vite + Tailwind frontend. Charts use `@visx`. E2E tests with Playwright.

See [`docs/architecture.md`](./docs/architecture.md) for a deeper overview and [`docs/data-pipeline.md`](./docs/data-pipeline.md) for the data flow.

## Quick start

Prereqs: Python 3.13+ with [`uv`](https://docs.astral.sh/uv/), Node.js 22+, GNU Make.

```bash
# one-time setup
make install

# regenerate the committed race manifest and start the dev server
make dev
# → http://localhost:5173
```

Build for production (same as CI):

```bash
make build
```

Run the full test suite (Python + site unit + Playwright E2E):

```bash
make test
```

## Repo layout

```
formula1/
├── seasons/ # F1 live-timing archive download scripts
│ ├── download_f1.py
│ ├── verify_f1.py
│ └── 2018…2026/
├── precompute/ # Python pipeline: raw .jsonStream → race manifest
│ ├── src/f1/
│ ├── tests/
│ └── fixtures/
├── site/ # React + Vite dashboard
│ ├── src/
│ ├── tests/
│ └── public/
├── docs/ # architecture, data pipeline, dev guide
├── Makefile # top-level orchestration
└── .github/workflows/ # CI + Pages deploy
```

## Contributing

Issues and PRs are welcome! Ideas for new views, data sources, or visualisations are especially appreciated — this is meant to grow beyond its first feature. Before opening a PR:

1. Run `make test` locally.
2. Keep changes focused — smaller PRs are easier to review.
3. Manifest formats are validated by Pydantic in `precompute/` and mirrored by Zod in `site/` — changes to one usually require the other.

See [`docs/development.md`](./docs/development.md) for local setup details.

## Data & credits

Race data comes from Formula 1's publicly accessible live-timing archive at `livetiming.formula1.com/static/`. F1, FORMULA 1, and related marks are trademarks of Formula One Licensing BV — this project is not affiliated with, endorsed by, or associated with Formula 1.

## License

[MIT](./LICENSE) © Yurii Chekhotskyi