If you identify any API bugs or errors in the data please record them here.
On driverStandings table there are also some duplicate entries for driverId 128, on races 300, 301, 302, 303 and 304.
The constructorStandings and driverStandings duplicates can be removed by the following two queries:
delete from constructorstandings where constructorstandingsid = 24518;
delete from driverstandings where driverstandingsid in (7118, 7149, 7180, 7211, 7243);
Finally, on the results table, there are 83 occasions where the same driverId has 2 or more results for the same raceId. This would mean the same driver participated on the same race for different teams. Did those drivers actually switch teams mid-race?
These entries can be found with this query:
select driverid, raceid, count(1) c from results group by driverid, raceid having c > 1;
“Finally, on the results table, there are 83 occasions where the same driverId has 2 or more results for the same raceId. This would mean the same driver participated on the same race for different teams. Did those drivers actually switch teams mid-race?”
Not necessarily different “teams”, just different entries, your query does not group by teams (i.e. constructors).
And yes, shared drives and car switches have long history in F1.
The standings errors have been corrected. I’ll work through the 83 results to find out what the problem is in a few days.
Hi, Chris, I’ve just checked. Nothing’s the problem with these.
77 of these are just shared drives/car switches.
The remaining 6 are:
– two entries for Harald Ertl in the 1978 Italian GP (he DNPQ’d an Ensign and DNQ’d an ETS)
– two entries for Keith Greene in the 1962 British GP (he was initially entered in car 50, but that didn’t arrive, so he practised in car 48 and DNS’d)
– two entries for Ron Flockhart in the 1958 Monaco GP (he tried and failed to qualify a Cooper and a BRM)
It’s just that a unique constraint on (raceId, driverId) is an invalid assumption on Eneko’s behalf as there are genuine multiple entries for the same driver in some races.
Thank you looking into it, emkael. Agreed, a unique index constraint for the races table does not apply, my bad. I updated the gist with the indices last night to reflect that change. The other indices should work well.
Thanks Emkael – hard to imagine all that car hopping these days!
Will you update the database image with latest races and drivers? 2017 races are not in the races table yet….
Done – watch out for updates though, as new drivers are announced etc.
qualifying row with id 409 has strange characters in the q1 column:
qualifying rows with raceid 64 are incorrectly formatted:
id 998 = 1:15:329
id 988 = 1:14:862
id 990 = 1:14:934
Further to my previous qualifying formatting issues there are some that have the following formatting:
id 1007 = 1.20.080
Thanks Rob – all now corrected.
Jean Alesi has grid position 41 on 1998 Australian Grand Prix (result id 3666). The correct grid position is 12. (https://en.wikipedia.org/wiki/1998_Australian_Grand_Prix#Race)
The ’98 Australian GP has incorrect grid position for Jarno Trulli, too. He qualified 15th, Wikipedia lists grid position of 11 (the same as Wurz’s).
For the 2017 Season I tried querying http://ergast.com/api/f1/2017/results?limit=1000 and noticed that the displayed number (#2) for Stoffel Vandoorne was coming out at (#47) in one of the columns.
After poking around i noticed that the “attribute:number” is correctly showing #2 for him but his “driver.permanentnumber” is set to #47
Can you please fix this?
Also, the grid #s shown for Australia-2017 seem to be outdated.
Daniel Ricciardo shows up #15 after he received a 5-grid penalty but during the formation lap his called stalled and he was forced to start from PitLane moving everyone below him up one spot and having him start from PitLane (i.e. 20).
Thanks – now fixed.
Thanks, now corrected. Note that drivers don’t move up the grid (the vacated space is left unoccupied) and that I use ‘0’ to indicate that a driver started from the pit lane.
Thanks for the fixes.
Ricciardo’s case is an odd one – I can’t recall any precedent of a driver “retiring” into the pit lane on formation lap, but not retiring from the race entirely.
So far, it’s been either a grid drop into the pit lane (due to penalties) – the grid was moved up because that was the new correct grid order, and driver(s) starting from the pit lane were at the back of the grid.
Or, it’s been a DNS (with either grid position “0” or driver’s initial grid position) if a car didn’t make to the grid.
All in all, not sure how it should be handled.
Anyway, speaking of grid position bugs – 1989 Spanish GP, Eddie Cheever (resultId = 8388) has a grid position of 61 (number of laps he covered in that race) – should be 22 🙂
Will there be an update for the whole VES/VER acronym debacle, resulting in reporting Verstappen as “VER” from 2017 onward?
He’s currently still turning up as “code=VES” in the Aussie GP results.
Hi, max verstappen is named VER in 2017 ( .. it was VES in 2016 2015 ..)
Thanks for the heads-up. Verstappen is now VER but this can’t be time-dependent due to technical limitations.
Hi, ok, why not just change it to VER so that it is correct now in stead of being correct in the past ?
That is what I’ve done.
Thanks a ton, Chris. Not just for the VES->VER update, but for hosting and maintaining this whole API!
Mail (will not be published) (required)
Notify me of follow-up comments by email.
Notify me of new posts by email.
and Comments (RSS)