The full code repository is available here.
I aim to discover recent F1 drivers’s best performing circuits over the 2021-2024 seasons, using simple statistical techniques (mean, std, var) and mixed-effects modeling. Specifically, these are two main exploratory questions:
To fast forward the data analysis/results section, please click here.
FastF1 is an open-source resource for F1 lap timing, car telemetry and position, tyre data, weather data, and more.
In order to create accurate comparisons within drivers and between teams in the same circuit over many years, I selected a roster of recent drivers that stayed in the same team for the past 3-4 years:
| Driver | Code | Team | Membership |
|---|---|---|---|
| Max Verstappen | VER | Redbull | 2021-2024 |
| Sergio Perez | PER | Redbull | 2021-2024 |
| Charles Leclerc | LEC | Ferrari | 2021-2024 |
| Carlos Sainz | SAI | Ferrari | 2021-2024 |
| Lewis Hamilton | HAM | Mercedes | 2022-2024 |
| George Russell | RUS | Mercedes | 2022-2024 |
| Valtteri Bottas | BOT | Alfa Romeo/Stake | 2022-2024 |
| Zhou Guanyu | ZHO | Alfa Romeo/Stake | 2022-2024 |
Similarly, I selected circuits that appeared across the 2021, 2022, 2023, and 2024 seasons:
| Name | Circuit | Length (m) | Type | Challenges |
|---|---|---|---|---|
| British GP | Silverstone Circuit | 5891 | Permanent | High-speed corners (e.g., Maggotts-Becketts complex) demand aerodynamic precision. Unpredictable weather and wind gusts affect stability. |
| Emilia Romagna GP | Autodromo Internazionale Enzo e Dino Ferrari | 4909 | Permanent | Narrow track with limited overtaking opportunities. Chicanes (e.g., Variante Alta) punish curb strikes. |
| Netherlands GP | Circuit Zandvoort | 4259 | Permanent | Banked corners (e.g., Turn 3 "Hugenholtzbocht") require unique setup. Sand dunes cause shifting wind conditions. |
| Japan GP | Suzuka International Racing Course | 5807 | Permanent | Figure-8 layout with high-G corners (e.g., 130R, Spoon Curve). Tire degradation is extreme due to lateral loads. |
| Australia GP | Albert Park Circuit | 5303 | Street | Bumpy surface with temporary barriers. Fast chicane (Turns 11-12) risks rear instability. |
| Azerbaijan GP | Baku City Circuit | 6003 | Street | Long straights into tight corners (e.g., Turn 8 castle section). Wind tunnels between buildings disrupt aerodynamics. |
| Belgium GP | Circuit de Spa-Francorchamps | 7004 | Permanent | Elevation changes (e.g., Eau Rouge-Raidillon) test downforce. Frequent rain creates sector-specific grip disparities. |
| Mexico GP | Autódromo Hermanos Rodríguez | 4304 | Permanent | High altitude (2,200m) reduces engine power and cooling. Slippery surface with low tire wear. |
| Abu Dhabi GP | Yas Marina Circuit | 5281 | Permanent | Artificial lighting alters visibility. Slow final sector harms overtaking despite long straights. |
| Saudi Arabia GP | Jeddah Corniche Circuit | 6174 | Street | High-speed blind corners (e.g., Turn 22) with proximity to walls. Dust on track reduces grip. |
| Monaco GP | Circuit de Monaco | 3337 | Street | Tight, narrow streets with zero runoff. Precision braking (e.g., Casino Square, Rascasse) and minimal overtaking opportunities. Mechanical grip > aerodynamics due to low speeds. |
I collected fast laps metadata (e.g., lap time, tyre compound used) from these drivers over the 2021, 2022, 2023, and 2024 seasons, as well as the available weather data (e.g., air temp, rainfall, track temp). All data calls were returned in a Pandas Dataframe, which are exported into a csv file.
Overall, the dataset has 18056 lap time ****recorded in a GP for 8 drivers over 4 seasons and 11 columns (year, lap number, lap time in seconds, track length in m, tyre life, and weather data).