Formula 1 · Telemetry intelligence

Read the telemetry.
Model the tyre.
Call the race.

LapBox loads real session data, predicts lap time and tyre degradation, and solves strategy as a duel between two cars that both get to react — then shows its working on every call.

The engine, open source on PyPI

pip install lapbox
What it does
  • 01For the grandstand

    One number that matters and a sentence explaining it. No stint tables, no jargon.

  • 02For the pit wall

    Every lap, stint and delta, fuel-corrected, with the undercut window drawn live.

  • 03For the model

    Training runs, loss curves and SHAP attributions behind every call the system makes.

  • VER1:31.204−0.182
  • NOR1:31.386+0.182
  • LEC1:31.559+0.355
  • Track temp41.2 °C
  • PIA1:31.702+0.498
  • UndercutL33–L36open
  • HAM1:31.884+0.680
  • Air27.8 °C
  • RUS1:32.011+0.807
  • SC risk18%by L38

Built on

  • FastF1

    Session & telemetry source

  • XGBoost

    Lap time · degradation

  • SHAP

    Attribution

  • FastAPI

    Typed REST surface

  • PostgreSQL

    Processed laps

  • Next.js

    This interface

One session, three readings

Same data. Different lens.

02 · Engineer

Everything, at pit-wall density.

Lap-by-lap pace with fuel burn corrected out, live stint state, the undercut window as it opens and closes, and the strategy call re-scored against the car you are actually racing.

  • Fuel-corrected pace, dirty air priced per driver
  • Undercut and overcut windows drawn as they move
  • Every call audited against the rival re-planning too

Fuel-corrected pace · last 12 laps

Gap ahead
+2.41s
Gap behind
−1.08s
Tyre age
14laps
Deg rate
0.07s/lap

Undercut window open — laps 33 to 36

The pipeline

Four steps between a raw session and a decision you can defend.

  1. 01

    Ingest

    A whole session at once — laps, telemetry channels, weather, tyre stints — cleaned of in-laps, out-laps and anything the timing loop got wrong.

  2. 02

    Model

    Lap time and per-compound degradation, with fuel burn corrected out and dirty air priced per driver, so pace means pace.

  3. 03

    Decide

    Strategy solved as a duel: two coupled cars, every pit-wall reflex answered at its best, weighed across every lap a caution could land on.

  4. 04

    Render

    The call, the margin it wins by, and the SHAP attribution behind it — in whichever of the three lenses you are reading in.

Open source · lapbox 0.1.0

The engine behind LapBox, as a Python library.

FastF1 gives you a session’s timing and telemetry. lapbox tells you what they mean: who was quicker where, how fast each car really was once the fuel is taken out, how hard the tyres went off. When the data can’t support an answer, it says so instead of returning a confident wrong number.

pip install lapbox

Python 3.11+ · MIT · charts: pip install "lapbox[plot]"

Two laps compared · from the quickstart

Python
import fastf1
from lapbox.telemetry import compare, delta_time

session = fastf1.get_session(2025, "Silverstone", "Q")
session.load()
ver = session.laps.pick_drivers("VER").pick_fastest().get_telemetry()
nor = session.laps.pick_drivers("NOR").pick_fastest().get_telemetry()

result = compare(ver, nor, driver_a="VER", driver_b="NOR")
if result.matched:
    print(f"VER ahead by {delta_time(result.aligned).iloc[-1]:+.3f} s at the line")
    gain = result.segments.loc[result.segments["time_delta"].idxmax()]
    print(f"VER gains most from {gain.start_distance:.0f} to {gain.end_distance:.0f} m: {gain.time_delta:+.3f} s")
else:
    print(f"Can't compare: laps differ by {result.residual:.0f} km/h RMS after alignment")
Output
VER ahead by +0.118 s at the line
VER gains most from 2957 to 4765 m: +0.202 s
Modules
17
Collection through documentation
Tests green
934
719 backend · 215 frontend
API endpoints
51
Typed, across 17 routers
Dashboard views
15
Telemetry to explainability

Access

Bring the pit wall’s view to your screen.

Real sessions, real telemetry, and a model that shows its working. Free, no account needed — pick the lens that fits how you watch.