Towards F1 Analysis Profile picture
Bringing F1 enthusiasts and data enthusiasts together. Want to learn how to do these analyses yourself? Check out my medium (link in bio).

Mar 2, 2023, 8 tweets

Tomorrow the first #F1 race weekend of 2023 starts!

You'll probably see a lot of data πŸ“ˆ flying around your timeline.

Why not analyze the data yourself?! Let me show you how with #Python πŸ‘€

Start with firing up a Jupyter notebook and installing Fastf1:

Now that Fastf1 is installed, we need to load the package.

This is how you do it:

Cool, that was easy!

Now we need to configure the cache βš™οΈ

In the same folder as your Jupyter notebook, create another folder called "cache" πŸ“

We now can select that folder with the following code:

Perfect, all the 'boring' stuff is over! Let's get some actual data.

We start with specifying our session. Make sure to change the year to 2023 tomorrow πŸ˜‰

The "SESSION" can either be 'FP1', 'FP2', 'FP3', 'Q', 'SQ', and 'R'.

Last step is loading the actual data, which is very straightforward:

Perfect, now we have data!

You can for example see all the laps of the session by accessing the "laps" attribute of the session variable.

Here's a few tricks you can use to easily access data and get...

πŸ‘‰ Fastest laps
πŸ‘‰ Driver laps
πŸ‘‰ Telemetry data

If you want to go more in-depth with this data (like making visualisations), check out my Medium.

There's plenty of tutorials there with many different use cases, all based on the #Formula1 data you just extracted!
medium.com/towards-formul…

Also, if you want to see a live demo of how this works:

I hosted a ~1h webinar doing exactly all this, which you can access via this link:

buymeacoffee.com/f1analysis/e/9…

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling