Skip to main content

Overview

Driver data provides static information about each driver participating in a session. This includes their unique identifier, full name, team affiliation, car number, team colors for visualization, and official headshot URLs.
Driver data doesn’t change during a session and serves as a reference for linking telemetry, lap times, and other performance data to specific drivers and teams.

File Location

Driver data is stored once per session:
Pre-Season Testing 2/Practice 3/drivers.json
Example:
  • Pre-Season Testing 2/Practice 3/drivers.json
  • Bahrain Grand Prix/Race/drivers.json
  • Monaco Grand Prix/Qualifying/drivers.json

Data Structure

The JSON file contains a drivers array with one object per driver:
{
  "drivers": [
    {
      "driver": "VER",
      "team": "Red Bull Racing",
      "dn": "3",
      "fn": "Max",
      "ln": "Verstappen",
      "tc": "4781D7",
      "url": "https://media.formula1.com/.../maxver01.png"
    },
    {
      "driver": "LEC",
      "team": "Ferrari",
      "dn": "16",
      "fn": "Charles",
      "ln": "Leclerc",
      "tc": "ED1131",
      "url": "https://media.formula1.com/.../chalec01.png"
    }
  ]
}

Field Reference

driver
string
required
Unique 3-letter driver identifier code. This is the primary key used throughout all datasets to reference a specific driver.Format: 3 uppercase letters
Examples:
  • "VER" - Max Verstappen
  • "HAM" - Lewis Hamilton
  • "LEC" - Charles Leclerc
  • "NOR" - Lando Norris
  • "ANT" - Kimi Antonelli
This code is used in telemetry folder names, lap times data, and as the cross-reference key across all datasets.
team
string
required
Full team name the driver is racing for.2026 Teams:
  • "Red Bull Racing"
  • "Ferrari"
  • "Mercedes"
  • "McLaren"
  • "Alpine"
  • "Aston Martin"
  • "Audi"
  • "Haas F1 Team"
  • "RB"
  • "Williams"
  • "Cadillac"
Team names may vary slightly in formatting across seasons. Always use exact string matching when filtering by team.
dn
string
required
Driver number (car number) displayed on the car.Format: String representation of number (1-99) Examples:
  • "1" - Current champion’s number (e.g., Max Verstappen 2026)
  • "44" - Lewis Hamilton’s permanent number
  • "16" - Charles Leclerc
  • "63" - George Russell
Drivers choose a permanent career number (except #1 which is reserved for the current champion). Stored as a string to maintain consistency with other datasets.
fn
string
required
Driver’s first name.Examples:
  • "Max"
  • "Lewis"
  • "Charles"
  • "Kimi"
ln
string
required
Driver’s last name (surname).Examples:
  • "Verstappen"
  • "Hamilton"
  • "Leclerc"
  • "Antonelli"
tc
string
required
Official team color in hexadecimal format (without # prefix). Used for data visualization and graphics.Format: 6-character hex color code
2026 Team Colors:
  • "4781D7" - Red Bull Racing (blue)
  • "ED1131" - Ferrari (red)
  • "00D7B6" - Mercedes (teal)
  • "F47600" - McLaren (papaya orange)
  • "00A1E8" - Alpine (blue)
  • "229971" - Aston Martin (green)
  • "F50537" - Audi (red/black)
  • "B6BABD" - Haas (gray)
  • "6692FF" - RB (blue)
  • "00A0DE" - Williams (blue)
  • "909090" - Cadillac (gray/silver)
To use in CSS/HTML, prepend with #: #4781D7. For RGB conversion: R=71, G=129, B=215 for Red Bull’s blue.
url
string
required
Web URL link to the driver’s official Formula 1 headshot photo.Format: Full HTTPS URL to image hosted on media.formula1.com
Example: "https://media.formula1.com/d_driver_fallback_image.png/content/dam/fom-website/drivers/M/MAXVER01_Max_Verstappen/maxver01.png.transform/1col/image.png"
These URLs point to official F1 media assets. Images are typically high-resolution portrait photos suitable for profile displays and graphics.

Real Data Example

Here’s actual driver data from Pre-Season Testing 2, Practice 3 (2026 grid):
{
  "drivers": [
    {
      "driver": "NOR",
      "team": "McLaren",
      "dn": "1",
      "fn": "Lando",
      "ln": "Norris",
      "tc": "F47600",
      "url": "https://media.formula1.com/d_driver_fallback_image.png/content/dam/fom-website/drivers/L/LANNOR01_Lando_Norris/lannor01.png.transform/1col/image.png"
    },
    {
      "driver": "VER",
      "team": "Red Bull Racing",
      "dn": "3",
      "fn": "Max",
      "ln": "Verstappen",
      "tc": "4781D7",
      "url": "https://media.formula1.com/d_driver_fallback_image.png/content/dam/fom-website/drivers/M/MAXVER01_Max_Verstappen/maxver01.png.transform/1col/image.png"
    },
    {
      "driver": "ANT",
      "team": "Mercedes",
      "dn": "12",
      "fn": "Kimi",
      "ln": "Antonelli",
      "tc": "00D7B6",
      "url": "https://media.formula1.com/d_driver_fallback_image.png/content/dam/fom-website/drivers/K/ANDANT01_Kimi_Antonelli/andant01.png.transform/1col/image.png"
    },
    {
      "driver": "LEC",
      "team": "Ferrari",
      "dn": "16",
      "fn": "Charles",
      "ln": "Leclerc",
      "tc": "ED1131",
      "url": "https://media.formula1.com/d_driver_fallback_image.png/content/dam/fom-website/drivers/C/CHALEC01_Charles_Leclerc/chalec01.png.transform/1col/image.png"
    },
    {
      "driver": "HUL",
      "team": "Audi",
      "dn": "27",
      "fn": "Nico",
      "ln": "Hulkenberg",
      "tc": "F50537",
      "url": "https://media.formula1.com/d_driver_fallback_image.png/content/dam/fom-website/drivers/N/NICHUL01_Nico_Hulkenberg/nichul01.png.transform/1col/image.png"
    }
  ]
}

Use Cases

Data Joins and Cross-Referencing

Linking Driver Data to Lap Times
import json

# Load driver data
with open('drivers.json') as f:
    drivers_data = json.load(f)

# Create lookup dictionary
driver_lookup = {
    d['driver']: d 
    for d in drivers_data['drivers']
}

# Load lap times for a driver
with open('VER/laptimes.json') as f:
    ver_laps = json.load(f)

# Get driver info
driver_code = ver_laps['drv']  # "VER"
driver_info = driver_lookup[driver_code]

print(f"{driver_info['fn']} {driver_info['ln']} ({driver_info['team']})")
# Output: Max Verstappen (Red Bull Racing)
Team-Based Analysis
# Group drivers by team
from collections import defaultdict

teams = defaultdict(list)
for driver in drivers_data['drivers']:
    teams[driver['team']].append(driver)

# Get all Ferrari drivers
ferrari_drivers = teams['Ferrari']
for d in ferrari_drivers:
    print(f"{d['fn']} {d['ln']} (#{d['dn']})")

Data Visualization

Color-Coded Lap Time Chart
import matplotlib.pyplot as plt

# Plot lap times with team colors
for driver in drivers_data['drivers']:
    driver_code = driver['driver']
    lap_data = load_lap_times(driver_code)
    
    # Convert hex to RGB
    hex_color = driver['tc']
    rgb_color = f"#{hex_color}"
    
    plt.plot(
        lap_data['lap'], 
        lap_data['time'], 
        color=rgb_color,
        label=f"{driver['fn']} {driver['ln']}",
        linewidth=2
    )

plt.xlabel('Lap Number')
plt.ylabel('Lap Time (s)')
plt.title('Lap Time Evolution by Driver')
plt.legend()
plt.show()
Driver Headshot Display
<!-- HTML template for driver cards -->
<div class="driver-grid">
  {% for driver in drivers %}
  <div class="driver-card" style="border-color: #{{ driver.tc }}">
    <img src="{{ driver.url }}" alt="{{ driver.fn }} {{ driver.ln }}" />
    <h3>{{ driver.fn }} {{ driver.ln }}</h3>
    <p class="team">{{ driver.team }}</p>
    <p class="number">#{{ driver.dn }}</p>
  </div>
  {% endfor %}
</div>

Statistical Analysis

Constructor Championship Standings
# Calculate team points from race results
team_points = defaultdict(int)

for driver in drivers_data['drivers']:
    driver_code = driver['driver']
    driver_points = calculate_driver_points(driver_code)  # Your function
    team_points[driver['team']] += driver_points

# Sort by points
standings = sorted(team_points.items(), key=lambda x: x[1], reverse=True)

for rank, (team, points) in enumerate(standings, 1):
    print(f"{rank}. {team}: {points} points")
Rookie vs Veteran Analysis
# Classify drivers (requires additional age/experience data)
rookies = ['ANT', 'BEA']  # Example: Antonelli, Bearman
veterans = ['HAM', 'ALO', 'PER']  # Example: Hamilton, Alonso, Perez

rookie_avg_laptime = calculate_avg(
    [d for d in drivers_data['drivers'] if d['driver'] in rookies]
)
veteran_avg_laptime = calculate_avg(
    [d for d in drivers_data['drivers'] if d['driver'] in veterans]
)

print(f"Rookie avg: {rookie_avg_laptime:.3f}s")
print(f"Veteran avg: {veteran_avg_laptime:.3f}s")
print(f"Delta: {rookie_avg_laptime - veteran_avg_laptime:.3f}s")

Driver Code Reference (2026 Grid)

Team Colors (2026)

TeamHex CodeRGBPreview
Red Bull Racing4781D7rgb(71, 129, 215)🟦 Blue
FerrariED1131rgb(237, 17, 49)🟥 Red
Mercedes00D7B6rgb(0, 215, 182)🟩 Teal
McLarenF47600rgb(244, 118, 0)🟧 Papaya
Alpine00A1E8rgb(0, 161, 232)🟦 Blue
Aston Martin229971rgb(34, 153, 113)🟩 Green
AudiF50537rgb(245, 5, 55)🟥 Red
HaasB6BABDrgb(182, 186, 189)⬜ Gray
Williams00A0DErgb(0, 160, 222)🟦 Blue
RB6692FFrgb(102, 146, 255)🟦 Light Blue
Cadillac909090rgb(144, 144, 144)⬜ Silver

Data Quality Notes

Driver data is static for the duration of a session but can change between sessions (e.g., reserve driver substitutions, team changes). Always load the driver data specific to the session you’re analyzing.
Headshot URLs point to external Formula 1 CDN servers. For production applications, consider caching images locally to avoid dependency on external availability.

Driver Number System

Permanent Numbers (2014-present):
  • Each driver chooses a permanent career number (2-99)
  • Number #1 is reserved for the reigning World Champion
  • Numbers are exclusive - once chosen, no other driver can use it while the driver is active
  • Some numbers are retired to honor legendary drivers (e.g., #17 for Jules Bianchi)
Notable Numbers:
  • #1 - Lando Norris (2026 Champion)
  • #44 - Lewis Hamilton (iconic)
  • #46 - Valentino Rossi’s MotoGP number (not used in F1)
  • Lap Times - Links to driver via drv, dNum, and team fields
  • Telemetry - Telemetry folders organized by driver code
  • Race Control - Driver-specific messages reference dNum
  • Corners - Used for spatial analysis of driver performance

Build docs developers (and LLMs) love