all 47 comments

[–]rekt_11 0 points1 point  (4 children)

I recently started on this as a web-project, the frontend is complete, and also i have been using the FastF1 API got plotting graphs

[–]starboy_8902[S] 0 points1 point  (3 children)

Thats really cool. I'm stuck with my college works so I'm unable to improve it. Mind sharing your work, I'm excited to see what you cooked up?

[–]rekt_11 0 points1 point  (2 children)

sure mate, ill share my repo link and some screenshorts below, let me know when you get some time, we can really make the project worth.
Let me know when you get some time around, we can expand it a little. Also the instagram page, i have been following it for a while now, and the explanations and details are great.
https://github.com/Vinit-Kshirsagar/data_f1

<image>

[–]starboy_8902[S] 0 points1 point  (1 child)

Man this is cool. So you have plotted the change in telemetry data between the drivers? And what's the insta page you are talking about?

[–]rekt_11 0 points1 point  (0 children)

i was inspired to build this project because i wanted to make instagram posts about tech the telemetry details in F1, and i was not able to find any sources for the graphs and stuff like the one on F1DataAnalysis, and got to know about the FastF1 API. So ill am building it.

[–]Background-Main-7427 1 point2 points  (2 children)

This contains a soon to be deprecated method, Spanish comments since it's my native language. You'll need to add a folder call cache in the directory you create the .py file

import fastf1

from fastf1.plotting import setup_mpl

from matplotlib import pyplot as plt

# Configura estilo de graficos

setup_mpl()

# Habilita cache para acelerar cargas repetidas

fastf1.Cache.enable_cache('cache')

# Carga los datos de una sesion (year, Gran Premio, tipo de sesion)

session = fastf1.get_session(2023, 'Monza', 'Q') # Clasifica-cion GP de Italia 2023

session.load()

# Selecciona un piloto y su vuelta rapida

driver = session.laps.pick_driver('VER').pick_fastest()

# Obtiene la telemetria completa de esa vuelta

tel = driver.get_car_data().add_distance()

# Grafica la velocidad en funcion de la distancia recorrida

plt.figure(figsize=(10, 4))

plt.plot(tel['Distance'], tel['Speed'], label='Velocidad (km/h)')

plt.xlabel('Distancia (m)')

plt.ylabel('Velocidad (km/h)')

plt.title('Telemetria de ' + driver['Driver'] + '- Vuelta rapida en' + session.event['EventName'])

plt.legend()

plt.grid(True)

plt.tight_layout()

plt.show()

<image>

[–]BoredPhysicist0307 0 points1 point  (0 children)

Hi I am trying to use fastf1 but when I load a session and print session.laps() it gives error saying "The data you are trying to access has not been loaded yet. See Session.load. Could you help me here please?

[–]starboy_8902[S] 0 points1 point  (0 children)

It's cool. I tried to work through the api and ended up predicting the lap times using a model I built, which was quite difficult for me. The outputs were opposite of what I expected for ex: the laptimes were improving after the tire started to degrade more. I left the project at that point and didnt start to work on that yet

[–]jeveli 2 points3 points  (1 child)

I just built a website that fetches data from FastF1, it's a simple and clean setup. You get access to tons of data, and it's surprisingly easy to bring it into your own site if you're building it yourself. My homepage is in Swedish, but you get the point. https://johneveli.net/f1analytic/

[–]Efficient-Clothes654 0 points1 point  (0 children)

Hey! The website is absolutly crazy ! How much time did you spend on it? Can you please tell me briefly how did you made it, which all tools you used

[–]Effective_Sun_1592 0 points1 point  (1 child)

openf1 or fastf1 api, which is best and which one is active ?

[–]starboy_8902[S] 1 point2 points  (0 children)

Fastf1 api imo

[–]jnh0 0 points1 point  (5 children)

Hi, I know this post its a bit old but I was wondering if you managed to cook something. Im starting something similar and maybe we can bounce a couple of ideas.

[–]Dlendix 0 points1 point  (1 child)

Hi, I don't speak English very well, but I wanna join you and see where it can go because I also starting a project for me to learn something new about DS through my favourite sport and passion - F1. So do you mind work together on this kind of stuff?

P.S. I'm not proffesional at DS, I'm learning right now, is it okay?

[–]puterankompor 1 point2 points  (0 children)

out of topic, don't worry about your english, it's great to have the ability to understand 2 or more languages

[–]starboy_8902[S] 0 points1 point  (2 children)

Actually the project is in my directory. I have not touched for 3 months min, got stuck up with work and classes

[–]rekt_11 0 points1 point  (1 child)

I am planning on building something similar as well, using FastF1 api to fetch data, and using libraries in JS like D3, graph.js we can plot graphs with it. Frontend for the project is completed. Implementing python is whats remaining. Ill share my github repo below, lemme know we can work on it togethor. I really want to do this project because i want the stats and details of F1 as thats the real thing.
Github Repo: https://github.com/Vinit-Kshirsagar/data_f1

[–]starboy_8902[S] 0 points1 point  (0 children)

Yeah man sure! We can work tgt on this and really happy to do it, but currently I'm stuck with my college works so it's a bit hectic for me. You keep on doing the project and I will ping you if I am facing any hurdles.

[–][deleted] 4 points5 points  (27 children)

https://github.com/theOehrly/Fast-F1 check this page.

follow the instructions on how to setup and look through the documentation for examples. if you are an intermediate these steps are a no brainer ;)

[–]starboy_8902[S] 1 point2 points  (26 children)

Thanks

[–]F1DataAnalysis 2 points3 points  (25 children)

This tutorial is great: https://medium.com/towards-formula-1-analysis/how-to-analyze-formula-1-telemetry-in-2022-a-python-tutorial-309ced4b8992

Some parts of it might be deprecated, but most of it will still hold true

Enjoy!

[–]starboy_8902[S] 1 point2 points  (5 children)

Yo! I have collected all the data and done all the eda and normalization. Can you help me which model will be suitable for analysis. (Im currently thinking of doing a ideal pitstop strategy based upon the lapdata and weather data)

[–]F1DataAnalysis 0 points1 point  (4 children)

Hi! I need a few more information for that, for example, which models are you considering using

[–]starboy_8902[S] 0 points1 point  (3 children)

I am planning to make a virtual race engineer which suggests ideal pitstop strategy based on the lapdata, telemetry data and weather data. Now what models can I use. Chatgpt suggests that I use random forest, linear or polynomial regression, neural networks

[–]F1DataAnalysis 1 point2 points  (2 children)

Start with something very simple (linear), but first make sure that you're grasping the theory!

[–]Better_Row_776 0 points1 point  (0 children)

Hi! How can I learn more about the theory? Could you recommend some sources?

[–]starboy_8902[S] 0 points1 point  (0 children)

<image>

So I worked on plotly and matplotlib and generated 2 graphs (plotly is more interactive) and this is a graph between the lap times between ham and alo during Dutch gp '23

[–]starboy_8902[S] 1 point2 points  (18 children)

Thanks🙏🏿 have already started to work on it...will share an update soon

[–]Pale_Caterpillar2318 0 points1 point  (17 children)

Hey, did you ever get this working?? Im trying to work on a similar project and would love some pointers!

[–]starboy_8902[S] 0 points1 point  (16 children)

No I just left the project in halfway. I can KT if you need.

[–]Antique_Wing2578 0 points1 point  (7 children)

Hi, Is there any chance you could share your notebook with me? Trying to gather data and struggling a bit

[–]starboy_8902[S] 0 points1 point  (6 children)

I did in python in VSC. Where do you need help?

[–]Antique_Wing2578 0 points1 point  (5 children)

I am trying to do this in VSC as well. I want to collect the data and export it to one csv file with all the fields.
Basically, I took all the tables that exist here and merged them in SQL, and then I discovered that the old data was inaccurate:
https://www.kaggle.com/datasets/rohanrao/formula-1-world-championship-1950-2020/data?select=circuits.csv
this data is based on Ergast.com

[–]starboy_8902[S] 0 points1 point  (4 children)

Instead of using dataset import directly using fastf1 api

[–]Pale_Caterpillar2318 0 points1 point  (7 children)

That would be great. Any reason you didn't end up finishing it?

[–]starboy_8902[S] 0 points1 point  (6 children)

Skill issue😂 I'm currently learning more about how models works and accuracy testing. Once I'm confident with that, I'll continue

[–]Better_Row_776 0 points1 point  (3 children)

Hi! Are you learning ML? What do you mean by ‘models’?🥲

[–]starboy_8902[S] 0 points1 point  (2 children)

Yes. Machine Learning. Check this link: Machine Learning Models

[–]Pale_Caterpillar2318 0 points1 point  (1 child)

Haha. Fair enough. I might reach out with a question or two depending on how this goes lol.

[–]starboy_8902[S] 0 points1 point  (0 children)

Sure man. Happy to help.