Skip to main content
This tutorial shows how to create a lap-by-lap delta comparison between two drivers. The visualization reveals who was faster on each lap and by how much, making it easy to spot performance trends throughout a race. Lap time delta comparison showing VER vs LEC at Monaco 2024

Setup

Load Session and Get Lap Data

Calculate Time Deltas

Convert lap times to seconds and calculate the difference for each lap.

Color Code by Faster Driver

Assign colors based on which driver was faster on each lap.

Create the Bar Chart

Visualize the deltas with a bar chart where bar height shows the time difference.

Add Legend and Styling

Complete Example

Here’s the full code in one block:

Interpreting the Chart

  • Bars above zero: Driver 2 was faster on that lap
  • Bars below zero: Driver 1 was faster on that lap
  • Bar height: Magnitude of the time difference in seconds
  • Color coding: Quick visual identification of who was faster

What to Look For

This visualization helps identify:
  1. Consistency: Who maintains more consistent lap times?
  2. Pace trends: Does one driver get faster or slower as the race progresses?
  3. Tire degradation: Increasing deltas may indicate tire wear
  4. Strategy impact: How do pit stops affect relative performance?
  5. Traffic effects: Sudden spikes often indicate traffic or incidents

Filtering Out Outliers

For cleaner analysis, you can filter out pit laps and safety car periods:

Comparing Multiple Driver Pairs

You can create a function to easily compare different driver pairs:

Summary

Lap delta comparisons provide a clear, lap-by-lap view of relative performance between drivers. This simple visualization makes it easy to spot patterns, consistency differences, and the impact of race events on driver performance.

Driver Lap Times

Individual driver analysis

Telemetry Comparison

Detailed telemetry analysis

Race Pace Analysis

Compare race pace

Position Changes

Track position changes
Last modified on March 6, 2026