Race pace analysis is one of the most common tasks in F1 data science. It involves looking at lap times over a long stint to see which driver is faster and how well they manage their tires.
Loading the Data
For this analysis, we’ll look at the 2024 Abu Dhabi Grand Prix. We’ll use the polars lib for faster filtering.
Cleaning the Data
In a race, lap times can be skewed by:
- Safety Car periods (very slow laps)
- Pit stops (very slow laps)
- Lap 1 (standing start)
We need to filter these out to get a “true” race pace.
Comparing Drivers
Let’s compare the pace of the top two finishers.
Interpreting the Results
- Median (line in the box): Represents the typical race pace.
- Box size (IQR): Represents consistency. A smaller box means the driver was more consistent.
- Whiskers/Outliers: Show variance caused by traffic or minor errors.
Visualizing pace over the race
To see how the pace evolved (tire degradation), we can plot lap times against lap numbers.
Conclusion
By following this workflow, you can:
- Load high-quality timing data.
- Clean it to remove anomalies.
- Compare drivers using statistical distributions.
- Visualize performance trends across the entire race.
Last modified on March 6, 2026