Accessing Formula -1 Race's ๐ŸŽ historical data using Python

Analyzing the 2021 Abu Dhabi Grand Prix with the Fast F1 library

Parul Pandey
9 min readOct 15, 2021

--

Image created by Author using Canva

# First published on Oct 15, 2021. Edited on March 20, 2022

Whatโ€™s behind you doesnโ€™t matter โ€” Enzo Ferrari

The 73rd season of the Formula One World Championship or F1 commenced in Bahrain on 20th March 2022. Fierce battles are being witnessed between the ten teams for the ultimate title. Nevertheless, the races are not without their fair share of drama, anticipation, sweat, tears, and emotions. It is what makes Formula 1 the most exciting as well as the most popular motor racing competition.

If you follow Formula1, you already know this, but what if it is the other way around? Should you even read further? Definitely! That's because the Formula 1 cars generate a tremendous amount of data, and where there is data, there are data scientists ๐Ÿ˜ƒ. This article will look at a Python library that enables you to access F1 historical timing data and telemetry very easily. This extracted data can then be utilized to perform various sorts of analysis. As an example, we'll look at the Abu Dhabi Grand Prix 2021. The race was pretty special on many accounts. Firstly, it was the season's final race, and most importantly, it was to decide the new F1 World Champion. The two leading contenders โ€” Max Verstappen and Lewis Hamilton- had 369.5 points coming into the race, and this race was going to decide who would ultimately take the crown. In a way, the race was what could be called the most intense title fight in years.

A quick guide to Formula 1

While this article is more focused on the data analysis part, I believe it will be worthwhile to introduce a few terms related to Formula 1 briefly. However, you can skip over to the next section if you are well versed in the sport.

What is Formula 1?

--

--

Parul Pandey

Principal Data Scientist @H2O.ai | Author of Machine Learning for High-Risk Applications