Introduce lap times in the database
This info can be extracted from the Ergast API: http://ergast.com/mrd/methods/laps/ (avalaible from 1996).
We also have the info in CSV format:
- https://www.kaggle.com/datasets/rohanrao/formula-1-world-championship-1950-2020?select=lap_times.csv
- http://ergast.com/mrd/db/#csv
It would be great to have lap times included in the F1DB. Even if it's only from a certain year upwards like 1996.
The questions I have:
- How can we verify the ergast data? What is the source? Is there another source to compare this with? E.g. wrong or even missing data.
- How to easily obtain new lap times asap after a new race is finished?
The Ergast API seems reliable, and has been active for a few years I think (I'm not very sure about its sources).
Official lap time data can be found in FIA documents, for example: In https://www.fia.com/events/fia-formula-one-world-championship/season-2022/saudi-arabian-grand-prix/eventtiming The PDF called Lap Analysis. I've been searching a lot and I can not find any other sources
I find the FIA page very difficult to carry out searches by race, and even more difficult to obtain the data (since it is in pdf, it is more complicated to scrape the data). I also think that the FIA has only uploaded documents to his page since 2019, I don't know where Ergast gets the rest of the information (there is a forum for questions, you can still ask).
And yes, it would be very very difficult and tedious to add the lap time information after each race manually. Not to mention that it would undoubtedly be the largest table in the database.
It would indeed increase the size a lot. Would you be willing to find out (via their forum) what their source is?
I'm a bit hesitant to depend on them for new data as it might delay F1DB releases.
Hello, I have already left a comment on the forum, it seems that the admin takes a few days to respond sometimes. You can follow it here: http://ergast.com/mrd/feedback/comment-page-8/#comment-464157
In the event that this will greatly delay the data update after each race, perhaps an annual upload of this data could be made, or for now simply add this historical data and that's it.
Yes, it could be a separate dist not being released directly after every race. But for future sustainability it would be better to know what Ergast uses as source.
Completely agree with you
Hi, Continuing this topic, Ergast replied that their main source is the FIA: http://ergast.com/mrd/feedback/comment-page-8/#comment-464167
I have done several checks on this data with python and it seems correct (if you add up all the lap times of a driver for a fairly old random race the final result equals the time in milliseconds of that driver in the raceResults)
Thanks for the update. Although the main source is the FIA, is the data publicly available as reference?
I haven't found much about it. As I said, the FIA data seems to have been uploaded on the web only since 2019. Investigating a bit on the Internet you can find pages like this: https://pitwall.app/analysis/compare-lap-times which coincidentally also has the information since 1996 as Ergast. Beyond that, nothing more.
Yes I guess they copy from each other. But question is where to retrieve new values from, like after a race has finished. What is the source then...
You can retrieve lap times since 2018 to present from Fast F1 API. They are using F1 live timing, so telemetry is pretty accurate. Although they are debugging errors that may happen due to red flags, et cetera
I cannot confirm you where Ergast lap times are retrieved from since 1996 to 2017. There may be some errors, but I think it is very reliable. Fast F1 is planning to take over Ergast since is being deprecated at the end of 2024.