Lap times for the 2014 F1 Malaysian Grand Prix
For the lap time plots in Melbourne what I did was download the XML file with all the data and convert that into a CSV file using an on-line tool. For this race, I managed to directly access the data from within Python using requests, an elegant and simple HTTP library. Everything else stays the same: I store the lap times for each driver in NumPy arrays, do some maths and create the plots using Plotly. For future races, I intend to refactor the code so as to use pandas, a powerful data analysis library, in the hope that I will be able to extract more information out of each driver’s lap times.
This plot shows the difference to the average pace of the race winner. That is, the difference to the average lap time, including pit stops and Safety Car periods.
The steeper the curve, the faster the lap; and as the curves are generated from cumulative sums of lap times, a negative slope implies a lap time which is quicker that the average.
This one is straightforward; it shows the position of the driver each lap.
Lap time statistics
This is a box-and-whiskers plot. It depicts each driver’s laps through their quartiles. The whiskers represent the lowest datum still within 1.5 IQR of the lower quartile, and the highest datum still within 1.5 IQR of the upper quartile. Suspected outliers are more than 1.5 IQR but less than 3 IQR above Q3 or below Q1 and are represented by an open circle. Anything 3 IQR above Q3 or below Q1 is represented by a filled circle.
Source: Ergast Developer API