#soberoctober day 23: charting f1 (barely)

Oct 23, 2017 12:19 · 215 words · 2 minutes read

Continuing from yesterday, I’ve got a new hypothesis. The lap times of individual drivers will follow a sawtooth pattern throughout the race, as tires wear out and pitstops replace them with faster fresh tires. Additionally, refueling was allowed in past years. I think that the deviation between slow and fast laps will be lower in the refueling races than in post-refueling races. (Because the modern cars have to carry the whole race’s worth of fuel from the start, they will show a more significant difference between early slow laps and late fast laps, than the refueling cars.)


OK scratch that lol, I hoped to gain some D3 skills but instead I learned how to wrangle data. It might be a good idea to lower my expectations.

I spent many more hours of trial and error to combine multiple pages from the Ergast API, then extract individual lap timing data objects, and then an unholy amount of googling until I found jq’s --slurp option to input objects and output an array wrapping them. The result was three shell scripts and one go script.

Once I had data, learning elementary d3 code was a breeze, clocking in at only 40 minutes or so. Yes, I know it’s ugly.

Historic Formula 1 Suzuka Grand Prix lap time records: