f1verse
f1verse · Python

How do I measure F1 tyre degradation from race data?

Call f1verse.stint_degradation(race). It returns seconds lost per lap for each stint, computed on fuel-normalised clean laps only, and reports how many laps each rate stands on.

>>> f1verse.stint_degradation(race)[3]
{'driver': 'NOR', 'stint': 2, 'compound': 'HARD', 'tyre_age_at_start': 0,
 'clean_laps_used': 18, 'degradation_s_per_lap': 0.041}
>>> f1verse.circuit_abrasion(race)
{'factor': 1.4, 'verdict': 'abrasive', 'samples': 55}

A car gets faster all race as it burns fuel, so raw lap times understate degradation on every stint. fuel_normalised() removes that trend before any rate is fitted — without it, a degradation number is mostly a fuel number.

Pit, safety-car and traffic laps are excluded, and a stint with too few clean laps left returns {'degradation_s_per_lap': None, 'reason': 'too few clean laps'} rather than a rate fitted to noise. Every number carries its sample count.

f1verse.tyre_outlook(race) projects the same rates forward to the point where a stint falls off its cliff.

Related