Analysing the 2022 Emilia Romagna GP with Python

Formula1 is one of the fastest growing sporting competitions in the world and THE biggest & most prestigious motorsport competition on the planet. As you can guess already, I am a huge Formula1 fan!

F1 teams perform at the highest level and operate at the cutting edge of technology. A lot of the tech that is used in these cars trickles down to everyday consumers. F1 cars are marvels of engineering and have hundreds of sensors onboard that relay data in real-time to their factories back home.

As someone who works with data for a living, I have always been fascinated with how such large amounts of data is processed in real-time to drive decisions such as pit stop strategy based on real-world conditions. These decisions are crucial and could result in your team making $100M in winnings or becoming a footnote in the history of F1.

I recently came across a Python library called FastF1 that provides access to F1 telemetry data (from 2018 onwards). It is very well put together and actively maintained. This is my first shot at analysing data from FastF1 and I’ve tried to extract insights and relate them to what occurred during the Grand Prix weekend.

Weekend Structure

The 2022 Emilia Romagna GP was designated a sprint weekend meaning the schedule was as follows

  • Free Practice 1 followed by Qualifying on Friday
  • Free Practice 2 followed by Sprint Qualifying on Saturday
  • Race on Sunday


The qualifying session was full of red flags due to the rain. Drivers kept going off the track resulting in the session being suspended several times. Both Mercedes drivers went out in Q1 itself which was a big shock!

Up at the front, it was a battle for pole between Max Verstappen and Charles Leclerc. Comparing their Q3 laps below, we can clearly see how much faster the RedBull was down the main straight compared to the Ferrari, allowing Max to carry more speed into Turn 1. Another interesting tidbit to note, we can confirm from the data that Max lifted in Sector 3 when Bottas had an off causing double-waved yellows.

The grid was set for Sprint Qualifying with Max Verstappen, Charles Leclerc and Lando Norris taking the top 3 spots.

Sprint Qualifying

At the start of Sprint Qualifying, Max had some trouble with his gear sync which caused him to lose positions. Looking at the Launch RPMs for the Sprint, we can see that Max’s RPM is quite a way off from his teammate Perez.

After a shaky start, Max was able to catch-up to Leclerc towards the end of the Sprint. With DRS assistance, he was able to make quick work of the overtake. Comparing the Sprint lap times for Max, Leclerc and Hamilton we can observe just how slow the Merc is this year compared to the RedBull and the Ferrari (ranging between 1–2 seconds slower per lap).

It’s also clear as day how Leclerc’s tires were gone (graining) towards the end of the Sprint with the massive difference in lap times between him and Max.

Looking at all driver lap times, we can see just how much faster the RedBull and Ferrari cars are compared to the rest of the grid. There is a massive difference!

The Sprint Qualifying was an exciting affair and the grid was set for the Race on Sunday with Max Verstappen, Charles Leclerc and Sergio Perez occupying the top 3 spots.


RedBull secured their 1st 1–2 finish after 2016 with Max Verstappen placing 1st and teammate Sergio Perez crossing the finish line in 2nd place. Carlos Sainz had his 2nd consecutive DNF, beaching his Ferrari F1–75 in the gravel trap after being tagged from the left by Daniel Ricciardo on the first lap. It was a tough weekend for Ferrari as Championship contender Charles Leclerc made an unforced error trying to catch up to Sergio Perez which cost him a podium finish.

It looks like RedBull were able to resolve the gear sync issues with Max’s car as he was able to get off the line flawlessly.

Comparing the lap times for Max, Leclerc and Hamilton. The Mercedes W13 did not have any pace yet again (after a poor showing in Qualifying and the Sprint). Hamilton was stuck in a DRS train for several laps and struggled to overtake Gasly. In contrast, his teammate George Russell was able to squeeze past several cars on the 1st lap thanks to some nifty driving and finished P4.

Comparing lap times across all drivers during the race,

There maybe some silver-lining (pun intended) for the Mercedes team as Hamilton recorded the fastest speed during the race (a whopping 340 km/h!). If Mercedes are able to solve their porpoising issues, they may be able to challenge for wins again. The next race is in Miami which has a very long straight that may be beneficial to cars that are faster in a straight line.


This season is shaping up very nicely into a tight battle between RedBull and Ferrari for the Constructor’s Championship and Max Verstappen & Charles Leclerc for the Driver’s Championship. The new regulations have worked very well so far in allowing cars to follow more closely and enabling more wheel-to-wheel action.

Bring on Miami!



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store