Chapter 25 Instructor Notes — F1 Data Visualization

Chapter: F1 Data Visualization: Speed Traces, Track Maps, Gap Charts, and the Visuals That Tell Racing Stories · Exercises · Quiz · Case Study 1 · Case Study 2 · Key Takeaways · Discussion guide

Chapter 25 opens Part IV by treating a chart as an argument that can be honest or dishonest. Every principle is shown as a before/after pair on real data: the gap-to-leader chart that misreads the 2025 Japanese GP, the truncated bar that inflates a 0.93 % difference twelvefold, the out-laps that squash a racing signal, and the team colours that fail readers with colour-vision deficiency. The chapter redesigns Anchor A's telemetry chart with a visible noise band, builds race traces and stint charts with focus and context, and ends with an interactive chart and its static fallback. Students build the viz.py module of Box Box, which draws every chart the simulator will need.

Learning objectives

By the end of the session, students should be able to:

  1. Start from the question, choose the chart form and the reference (leader, winner's mean pace, or a fixed car) that answers it.
  2. Apply honest-axis rules: bars need a meaningful zero, windows clip the view but never the data, and direction must mean "ahead".
  3. Audit a palette for contrast (3:1 against the background) and colour difference (ΔE in OKLab) under simulated colour-vision deficiency.
  4. Add a second cue (line style, marker, direct label) so colour is never the only channel.
  5. Choose sequential, diverging or categorical colour scales, and explain why lightness must be monotonic.
  6. Show the instrument's limits on the chart: noise bands, frozen telemetry, intervals.
  7. Build an interactive chart with a static fallback and a table view.

Threshold concept

This chapter has no formal threshold concept. Its key idea is every chart makes a promise: a bar promises length from zero, a colour promises identity, a reference line promises "ahead", a shared axis promises comparability. Students who have this audit their own charts by asking "what does this chart promise, and does the data keep the promise?"

Suggested 75-minute session plan

Time Segment What happens
0–8 min Hook Show the default gap-to-leader chart for the 2025 Japanese GP: Verstappen "11.033 s behind" on lap 22. Ask: "Was Verstappen ever losing this race?" Reveal the gap-to-Verstappen chart: Norris 1.0–2.6 s behind on all 49 racing laps, never inside 1 s.
8–25 min Concept Question first; honest axes. The truncated bar: cut at 90.9 s, Gasly's bar is 12.7× Piastri's for a 0.93 % difference. Clip the view, not the data: two 114 s out-laps squash a 2.9 s signal.
25–42 min Live demo Run code/02_colour_audit.py, then code/04_telemetry_design.py. Show the 2026 Audi–Ferrari pair (ΔE 1.7, effectively one colour) and the deuteranopia render. Then the Anchor A delta with its ±0.05 s noise band: 65.1 % of the trace lies inside it.
42–62 min Activity Chart clinic. Each pair brings (or is given) one chart from an earlier chapter, applies the chapter's accessibility checklist (25.9), and redraws one element. Two pairs present before/after.
62–75 min Wrap-up Fixing one problem can break another: darkening the failing 2026 team colours to 3:1 removed every contrast failure and raised colliding pairs from 4 to 9. Exit ticket: "Name the promise your chart makes, and the check that proves it."

Key numbers students should leave with

  • 2025 Japanese GP race: Norris–Verstappen gap min 1.035 s, median 1.515 s, max 2.551 s over 49 racing laps; 0 laps under 1.0 s. Final stint: Norris faster on 18 of 31 clean laps, median −0.013 s.
  • Race pace (median fuel-corrected clean lap, toolkit default 100 kg × 0.03 s/kg): Piastri, Verstappen (+0.013) and Norris (+0.030) within 0.03 s with overlapping intervals.
  • Distributions beat means: median clean-lap IQR 0.495 s vs median neighbour gap 0.098 s, five times smaller.
  • Anchor A delta (2025 Japan qualifying, Verstappen vs Norris): end +0.012 s; 65.1 % of the trace within ±0.05 s.
  • Colour maps: jet's lightness falls in 108 of 255 steps; viridis and plasma rise in all of them.
  • Team colours below 3:1 on white: 4/10 (2023), 6/10 (2024), 6/10 (2025, Mercedes 1.40:1), 5/11 (2026).
  • Colliding pairs (worst ΔE < 6): 4 in 2023, 0 in 2024 and 2025, 4 in 2026 (Audi–Ferrari 1.7 normal vision).
  • Compound colours: SOFT vs INTERMEDIATE ΔE 34.9 for normal vision but 8.0 under deuteranopia; HARD contrast on white 1.14:1.
  • Grid slot 1, 1994–2026: 622 starts, 308 wins (49.5 %), 14.3 % not classified. This counts the car that started from grid slot 1; the pole-to-win rate used elsewhere in the book is 51.6 % over 1994–2026.

Common misconceptions and remedies

Misconception Remedy
"Gap to leader is the natural race chart." The leader changes during the stops. Choose a fixed reference that answers the question; in safety-car races, use a fixed car rather than the winner's mean pace.
"Zooming the axis is always fine." For bars, no: bars promise length. Draw gaps, with intervals, instead.
"Remove the outliers so the chart is readable." Clip the view, mark the off-scale points with their true values, and break the line.
"Team colours are the obvious palette." Half the grid fails 3:1 on white in every season; some pairs collide. Add line styles, markers and direct labels.
"A rainbow scale shows more detail." It invents boundaries where lightness reverses. Use a perceptually uniform scale.
"Interactive charts replace static ones." Tooltips enhance; they never gate. Ship a static fallback and a table view.
"Darkening every failing colour fixes accessibility." It raised 2026 collisions from 4 to 9. Check the colours actually used in each chart.

Exercises to assign

  • Core (everyone): Part A — A1, A3, A4, A6, A9; Part B — B1 (contrast in light and dark mode), B3 (the distortion of a truncated bar), B7 (compound colours under deuteranopia).
  • Code lab: Part C — C1 (2024 Japanese GP: default vs redesigned gap chart) and C3 (audit a palette). Add C7 (the deuteranopia render of three of your own figures).
  • Judgment: Part D — D3 (the honesty audit of an earlier chapter's chart) and D2 (a single broadcast graphic) are strong portfolio pieces.
  • Stretch: Part C — C8 (an interactive stint explorer); Part E — E1 (a colour-safe F1 palette).
  • Interleaving: Part M — M1 (Ch 19 + Ch 25: the uniform-delta spike at the Suzuka hairpin) and M3 (Ch 22 + Ch 25: showing the fuel label on a degradation chart).

Lab tips

  • Run order: every script stands alone and finishes in under 10 s, so any of them can be demonstrated live. All run offline.
  • Saved outputs: printed results are in code/output/<script>.txt; 06_interactive_plotly.py writes the HTML chart and code/output/vegas_2026_race_trace.csv.
  • Gotcha — the interactive chart loads plotly.js from a CDN. In a classroom without internet, the HTML will be blank; the chapter documents the offline option, and the PNG fallback is in images/.
  • Gotcha — overlapping end labels: plots.position_chart and plots.gap_chart draw labels that collide when cars finish close together. Use viz.focus_lines instead.
  • Gotcha — the uniform delta: plots.speed_trace with two laps uses the uniform delta_time, which creates a −0.258 s spike at the Suzuka hairpin. For a published delta, use boxbox.laptime.delta_trace(align="sectors").
  • Gotcha — legends: calling ax.legend() after plots.deg_plot wipes its custom handles; plots.stint_chart's compound legend can collide with the source line, which viz.source_below fixes.
  • metrics.race_pace returns no intervals; the chapter bootstraps clean laps itself (seed 42). Students who want intervals must do the same.

Connections

  • Backward: Chapter 19 (Anchor A and the ±0.05 s rule), Chapter 22 (fuel labels on degradation), Chapter 23 (telemetry channels and frozen stretches).
  • Forward: Chapter 26 and Chapter 27 use outcome_hist and the race trace to show predictions and simulated distributions; the capstone (Chapter 40) builds its race report from viz.