Transform raw Formula One timing data into interactive race replays
T

Transform raw Formula One timing data into interactive race replays

Transform raw Formula One timing data into interactive race replays

6,084 stars
N/A forks
N/A contributors

README

Project documentation from GitHub

Turn F1 Timing Data Into a Live Race Replay

Ever wondered what happens to all the raw timing data generated during a Formula One race? The lap times, sector splits, and driver positions are a goldmine for storytelling, but they usually just scroll by in a table or get summarized in a graphic. What if you could take that data and reconstruct the entire race, lap by lap, as an interactive replay?

That’s exactly what the f1-race-replay project does. It’s a developer tool that ingests the raw, often messy, timing data from an F1 session and transforms it into a clean, visual, and interactive race replay you can run in your browser. It’s for developers, data enthusiasts, and F1 fans who want to go deeper than the broadcast.

What It Does

In simple terms, this project is a data pipeline and a visualizer. You feed it a JSON file containing the official F1 timing data (which you can capture from live streams or find in archives). The tool then processes this data, calculating gaps, positions, and lap history, and finally serves up a local web application. This app lets you play, pause, and scrub through the entire race session, watching the driver positions update on a mini-track, alongside a live leaderboard and detailed lap time tables.

Why It’s Cool

The clever part isn’t just the visualization—it’s the data transformation. Raw F1 timing data isn’t a simple log of positions; it’s a stream of stateful messages. This project reverse-engineers that stream to build a coherent timeline of the race. It handles pit stops, retirements, and sector times, turning a complex data feed into a structured narrative.

For developers, it’s a fantastic case study in parsing real-time data, state management, and building a timeline-based UI. You can see how the race unfolded strategically, like watching a pit window open or seeing how a driver’s pace changed on different tire compounds. It turns abstract numbers into a tangible story.

How to Try It

Getting your own replay up and running is straightforward. You’ll need Node.js installed.

  1. Clone the repo:

    git clone https://github.com/IAmTomShaw/f1-race-replay.git
    cd f1-race-replay
    
  2. Install dependencies:

    npm install
    
  3. Add your data: Place your F1 timing data JSON file (often named session.json) in the project's data/ directory.

  4. Run the processing script and server:

    npm run process-data
    npm start
    

Did you like this issue?

Join our weekly newsletter

Love discovering amazing projects?

Help us continue bringing you the best open-source discoveries every week.

Back to Projects
Last updated: Mar 18, 2026