Sunday, May 24, 2015

F1 Monaco - Qualifying Session, Graphical Review, Annotated

The summary charts below provide a graphical summary of the qualifying session of the 2015 Monaco Formula One Grand Prix.

The charts are intended to provide an at a glance summary of the session, yet also repay deeper reading for the journalist, or fan, looking for stories in the data.

To start with, here is what the official results sheet published by the FIA looks like. The drivers are ordered by final classification, along with the best laptime recorded by each driver in each part of qualifying they participated in, the time of day that laptime was recorded, and the number of laps they completed in each of those sessions.

The qualifying progression chart (rank based) attempts to summarise how the drivers were ranked in each part of qualifying, and show how they progressed through the qualifying sessions. In Q1 and Q2 I highlight the drivers that missed the cut. The best time recorded by each driver in each part of qualifying is also shown. Whilst the chart does not show how driver laptimes evolved, the fact that a driver's rank changed considerably may indicate that the laptime they achieved in one session did not develop in the same way as the laptimes of the other drivers. So for example, we Verstappen slip going from Q2 to Q3 and then note that his time in Q3 was tenths down on his times in both Q1 or Q2. Similalry, Raikkonen failed to improve much on his Q2 time in Q3, whereas Ricciardo found also 7 tenths and gained 3 places on his Q2 rank:
A qualifying session chart ordered by laptime shows more clearly how drivers' times evolved from session to session:
Hamilton's improvement going from Q2 to Q3 is noticeable...

Another source of data we can get from the FIA are laptimes recorded across the whole of the session. The raw data comes as a set of personally numbered laptimes for each driver.

The session utilisation chart records the laptime for each driver against session time (so we can see how far into the session each laptime was recorded, and how the laps are grouped). None representative laptimes - outlaps and inlaps - are depicted by symbols. The chart also records the best time the driver recorded across all three parts of qualifying, along with the total number of laps. Gaps are also provided based on the overall session best times. 

Purple (best overall laptime) and green (driver's personal best) times can be calculated in two ways. Firstly, relative to qualifying overall, as shown below (the chart shows how the times evolve - eg read from left to right as session time evolves and you can see how purple and green (leaderboard) times evolve). The lack of greens in Q3 shows drivers who didn't improve on their Q2 times.

The spatial layout allows us to see how the drivers timed their campaign during each part of qualifying.

We can also produce session utilisation charts depicting purple and green times relative to each part of qualifying - so showing how the times evolved within either Q1, Q2 or Q3 separately.

The session based laptime text plots (scatter plots) show when in the session each driver recorded their competitive laptimes (x axis is session time, y axis is laptime). The coloured labels show the best laptime recorded in the session by each driver and the colour whether that laptime was enough to get them through to the next round of qualifying.

The solid grey line shows the evolution of the session cutoff time across that part of qualifying. The dashed line shows the final cutoff time.

Here's the chart for Q1:
Here's the chart for Q2. A reading of this chart suggests that Grosjean and Button both just missed the cut. Button's time was set on his first run and not improved on, Grosjean's on his second run (around about 2170). At the time he made that second run, his time was inside the cut (below the solid grey line) but then Perez and Ricciardo posted improved times (around about 22050) and he slipped above the cut. Grosjean's final lap (just after 2300) didn't improve on his time, but Ricciardo's (at 2400) did.
Here are the Q3 times. The cutoff in this case is rather artificial, an represents the front row of the grid.

These last three charts are a little difficult to interpret at first, but as you learn to read them they become increasingly powerful. The session utilisation charts also repay a close reading, although I think they do still represent a useful glanceable chart. The session progression charts are intended to be fully glanceable and perhaps work best as a pair - labels are easily occluded in the laptime based chart, but clearly separated in the rank based chart. The Rank based chart might perhaps benefit from some horizontal line segments that group ranked drivers whose laptimes are close together?

Hopefully that quick review gets you started on how to read these charts, and how to start using them to look for stories within them. Remember: they are they to be read, and it takes time to learn how to read.

Saturday, May 23, 2015

F1 2015 Monaco Qualifying Review

(For an annotated version of this post that describes the charts - and some of the things we can read from them - see F1 Monaco - Qualifying Session, Graphical Review, Annotated.)

Qualifying progression chart (rank based):

Session utilisation chart - purple and green times relative to qualifying overall:

Session utilisation chart - purple and green times relative to each part of qualifying:

Q1 - competitive laptimes and session cutoff time evolution:

 Q2 - competitive laptimes and session cutoff time evolution:
 Q3 - competitive laptimes and front row cutoff time evolution:

Sunday, May 10, 2015

F1 2015 Spanish Grand Prix - The Race from Three Perspectives: HAM, VET and BOT

Code describing how to create these charts appears in Wrangling F1 Data With R.

F1 Spain - Qualifying progression chart (corrected) and Q3 "grid"

A corrected version of the progression chart - using the rather more reliable ergast data than the flakey FIA web data...

If we use a time based y-axis, we can see a couple more things. Firstly, how the cars are grouped in terms of time, perhaps revealing something about qualifying strategy and doing "just enough"? Secondly, whether improvement was made in laptime going from one qualifying session to the next: lines that slope upwards left to right show a deterioration in laptime. If you imagine replacing an upward sloping line with a horizontal line it shows you where a driver would have qualified had he repeated his earlier, better laptime.
The problem with using the vertical laptime axis is that there is a high likelihood of labels colliding. The directlabels R package provides several utilities for managing label layout - I wonder whether the apply.method function could be used to adjust the label positions so that they can be clearly read. In the chart below, symbols are used to depict exactly the actual laptimes on a real number scale; in the above chart, the line endpoints arguably perform a similar role?

And this is how the times from Q3 compared in a time-grid layout:

Saturday, May 9, 2015

F1 2015 Spain Qualifying

The progression chart shows how laptimes are recorded through the session. The ordering is not faithful to the ranked overall classification, and the gap times do not correspond to gap times given in the final classification. Instead, they are based on the best recorded laptimes measured across the whole session. (For example, you can see this in Q3 where some drivers do not improve on their Q2 times.)

Here's a view of the session utilisation with rows ordered by overall classification and colouring relative to each separate round of qualifying: 

How did the cutoff time evolve in Q1?

How did the cutoff time evolve in Q2?

How did the front row of the grid cutoff time evolve in Q3?

And finally, how did the drivers progress through all three qualifying sessions?

Hmm... a tied time... How should I represent that? We can tell from the chart which cars are involved. If the higher classified car is the one with the better Q2 position, we can also pick this up clearly.

PS Hmmm....seems like the FIA website is giving random results compared to the official timing sheets?

For a corrected version of the chart, and a view that shows the laptime progression across qualifying sessions, see F1 Spain - Qualifying progression chart (corrected) and Q3 "grid".

Code describing how to create the evolving cut-off time will appear in a forthcoming chapter of Wrangling F1 Data With R.

Spain FP3 - Session Summary

First, session utilisation and session summary:

Second, how it looks for qualifying:

Friday, May 8, 2015

Sketches Around P2 - Spanish Grand Prix, 2015

Some quick sketches around P@...

Session utilisation:

With rows reordered according to session best time:

Long run stints:

 Focus - long run stints: