Sunday, August 26, 2012

F1 2012 Mid-Season Review - Pit Stops

How have the teams compared in their pitstop efficiency over the course of the season? Let's see...

[UPDATE - I messed up on the race orders in the original version of this post (thanks for letting me know via the comments:-) - fixed now]

First of all, a quick histogram to see how the pit stop times were distributed... The height of the bars shows how many pit stops there were within a particular time window. (x-axis is pit stop time). The low value outliers represent drive thru penalties, so the fastest 'proper' pit stop is at the left hand edge of the major cluster.



So how do the teams fare? This chart compares teams by race - the time shown on the y-axis is the excess time over the fastest legitimate (non-drive thru) pitstop.
[UPDATE - arrghhhh... I think the first valid pit stop detector routine I used had a bug in it - using the 2nd fastest pit stop time more often than not...UPDATE2: having fixed the bug, the charts are now slightly off, eg Malaysia - sometimes a non valid pitstop appears to be creeping in... I need to tweak my algorithm...]

The colours represent driver within a team (orange is driver 1, green driver 2). So for example, in Australia, driver 2 was served badly by his team compared to driver 1 in that team.


We can see how the teams compare with each other in each race if we generate a boxplot distribution for the pitstop times recorded by each team. Although there's not really enough data for this view to be properly useful, it is a little easier to pick out pattern and structure than in the dot plot:


An alternative way of organising the plots is to look at how pitstop times varied within a team across all the races to date:

Again, a box plot can be used to give us a more striking interpretation of how the distributions vary across races - Mercedes performance seems as if it deteriorated quite badly over the last part of the first half of the season:

Finally, a loess best fit line through the times for each team. I'm not really sure how useful this is?


As ever, comments appreciated. The code used to generate these images can be found here.

3 comments:

  1. Would it be possible to show the loess graph as percentage lost vs. Best time on the Y axis and have the races in chronological order please?

    Actually the races need to be in chronological order in all the graphs.

    ReplyDelete
  2. Could you send the raw data? I use SAS to make my analysis and I wanna to show a times series plot to show they how the times are decreasing. Tks

    ReplyDelete
    Replies
    1. The data is scraped from the FormulaOne website and can be found here: https://scraperwiki.com/scrapers/f1comscraper/

      Delete

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