← all work

F1 Telemetry Pipeline

A data pipeline for Formula 1 telemetry on OpenF1 data: it covers all 18 completed 2026 races, validates every sample, cross-checks against official results, compares Audi's two drivers down to braking zones and rebuilds its web report after every race.

Type
Personal Project · Data / Motorsport
Year
2026
Role
Sole developer - pipeline, validation, report and tests.

At the 2026 US GP it checked 42,898 samples and traced all 124 dropouts to the data feed, not the cars; across the season, 5 of 5 cross-checks against official data pass.

  • 18 races, 20,693 laps
  • 5/5 cross-checks against official data
  • 32 tests in Python and C#, CI

The problem

Telemetry is only useful if you can trust it: samples go missing, values arrive out of range, and a gap can be a sensor fault or just the data feed.

Load real race telemetry, find out what is wrong with it and why, and compare two drivers lap by lap.

What I did

  1. Loaded car data (~4 samples per second) and laps for Hülkenberg and Bortoleto from OpenF1, with cached raw responses and retries for rate limits.
  2. Assigned each sample to its lap, worked out distance from speed, and checked it against the official track length (-1.4 %).
  3. Validated missing values, physical ranges, timestamp order and gaps over 1 s, and told feed dropouts from car dropouts by checking whether every car lost data at the same moment.
  4. Stored samples, laps and issues in SQLite and built an HTML report with lap times, sector deltas, the time gap along the track and a track map coloured by the faster driver.
  5. Loaded the laps of all 18 completed 2026 races (20,693 timed laps) and cross-checked them against official data: sector sums, lap counts, speed trap and finishing order.
  6. Broke the lap gap down into braking zones and added a simple race-pace forecast for the remaining races, backtested on the races already run.
  7. Added a scheduled GitHub Action that rebuilds and publishes the report only when a new race is available.
  8. Wrote a second, independent validator in C# (.NET 8, xUnit) that re-runs every sample check and must agree with the Python results before a report is published.
  9. Re-implemented the braking-zone detection in MATLAB (also runs in GNU Octave); it finds the same 7 zones at the same positions and speeds as the Python report.

Outcome

Public on GitHub with a self-updating report and CI: at the 2026 US GP, Bortoleto's best lap was 1.93 s faster, and the seven main braking zones explain 1.70 s of it. The forecast puts both Audis about 2 % off the fastest car, backtested at ±0.65 percentage points.

Stack

  • Python
  • pandas
  • NumPy
  • SQLite
  • Plotly
  • C#
  • .NET
  • MATLAB
  • pytest
  • xUnit
  • ruff
  • GitHub Actions
Next caseMorph

© Johan Stefanesback home

Get in touch
Still building this site