Saturday, May 14, 2011

F1 2011 Turkey Race - Fuel Corrected Laptimes By Stint

A couple of days ago, I saw a really nice way of looking at laptime data on the Making up the Numbers blog post on A Great Piece of Fine China. Rather than showing a continuous line for each driver, a break in the line was introduced following each pit stop, a bit like the following:



I made a quick tweak to my code, and produced a new data file grouping times by stint using the heuristic that if there a 12s decrease in laptime then we've probably pitted and have probably got new tyres. (As and when I start to reconcile the data from the different FIA timing data sheets, I'll be able to use the listing of pit stops to do this exactly. But for now, I'm focussing on what I can do with just the timing data, because this could be used as part of a lap-by-lap, realtime visual analysis strategy.) You can find the data here.

Here's an example of a plot showing raw and fuel weight penalty corrected laptimes, by stint, for VET and HAM.



(I guess what might be useful would be to use colour and linestyle dimensions to distinguish between driver and tyre type? So colour for driver and line style (dotted, dashed, etc) for tyres? Or vice versa?)

From the fuel corrected trace, I don't think it's obvious for these drivers which tyre is being used in which stint? Looking over some of the other drivers, there are hints of soft tyres coming on (fuel weight penalty adjusted laptimes coming down just after a pitstop) but nothing conclusive?

For reference, I used the following gnuplot command to generate the above trace, (though I can't help feeling there must be a better way!):

gnuplot> set term x11
//My mac doesn't display anything with the aqua setting?
gnuplot> set datafile separator ","
//my data file is CSV, so define the separator, just in case...
gnuplot> d2n2="HAM fuelcorrected"
gnuplot> d1n2="VET fuelcorrected"
gnuplot> d1n="VET"
gnuplot> d2n="HAM"
gnuplot> driver=1
gnuplot> driver2=3
gnuplot> col1="blue"
gnuplot> col2="magenta"
gnuplot> typ=4
gnuplot> typ2=5
gnuplot> plot 'turdemoHistory-StintLapTimes.csv' using ($3==driver && $1==1? $2:1/0):typ with lines lc rgb col1 title d1n,'turdemoHistory-StintLapTimes.csv' using ($3==driver && $1==2? $2:1/0):typ with lines lc rgb col1 title d1n,'turdemoHistory-StintLapTimes.csv' using ($3==driver && $1==3? $2:1/0):typ with lines lc rgb col1 title d1n,'turdemoHistory-StintLapTimes.csv' using ($3==driver && $1==4? $2:1/0):typ with lines lc rgb col1 title d1n,'turdemoHistory-StintLapTimes.csv' using ($3==driver && $1==5? $2:1/0):typ with lines lc rgb col1 title d1n,'turdemoHistory-StintLapTimes.csv' using ($3==driver2 && $1==1? $2:1/0):typ with lines lc rgb col2 title d2n,'turdemoHistory-StintLapTimes.csv' using ($3==driver2 && $1==2? $2:1/0):typ with lines lc rgb col2 title d2n,'turdemoHistory-StintLapTimes.csv' using ($3==driver2 && $1==3? $2:1/0):typ with lines lc rgb col2 title d2n,'turdemoHistory-StintLapTimes.csv' using ($3==driver2 && $1==4? $2:1/0):typ with lines lc rgb col2 title d2n,'turdemoHistory-StintLapTimes.csv' using ($3==driver2 && $1==5? $2:1/0):typ with lines lc rgb col2 title d1n, 'turdemoHistory-StintLapTimes.csv' using ($3==driver && $1==1? $2:1/0):typ2 with lines lc rgb col1 title d1n2,'turdemoHistory-StintLapTimes.csv' using ($3==driver && $1==2? $2:1/0):typ2 with lines lc rgb col1 title d1n2,'turdemoHistory-StintLapTimes.csv' using ($3==driver && $1==3? $2:1/0):typ2 with lines lc rgb col1 title d1n2,'turdemoHistory-StintLapTimes.csv' using ($3==driver && $1==4? $2:1/0):typ2 with lines lc rgb col1 title d1n2,'turdemoHistory-StintLapTimes.csv' using ($3==driver && $1==5? $2:1/0):typ2 with lines lc rgb col1 title d1n2,'turdemoHistory-StintLapTimes.csv' using ($3==driver2 && $1==1? $2:1/0):typ2 with lines lc rgb col2 title d2n2,'turdemoHistory-StintLapTimes.csv' using ($3==driver2 && $1==2? $2:1/0):typ2 with lines lc rgb col2 title d2n2,'turdemoHistory-StintLapTimes.csv' using ($3==driver2 && $1==3? $2:1/0):typ2 with lines lc rgb col2 title d2n2,'turdemoHistory-StintLapTimes.csv' using ($3==driver2 && $1==4? $2:1/0):typ2 with lines lc rgb col2 title d2n2,'turdemoHistory-StintLapTimes.csv' using ($3==driver2 && $1==5? $2:1/0):typ2 with lines lc rgb col2 title d1n2

No comments:

Post a Comment

There seem to be a few issues with posting comments. I think you need to preview your comment before you can submit it... Any problems, send me a message on twitter: @psychemedia