Skip to main content
These tables track safety-related race interruptions and neutralization periods in Formula 1 races.

Safety Cars

The safety_cars.csv table contains information about physical safety car deployments during races.

Schema

FieldTypeDescription
RacestringName of the Grand Prix
CausestringReason for safety car deployment
DeployedintegerLap number when safety car was deployed
RetreatedfloatLap number when safety car returned to pit lane
FullLapsintegerNumber of full laps under safety car
Retreated may be \N if the race did not resume after safety car, or data is unavailable.

Sample Data

RaceCauseDeployedRetreatedFullLaps
1973 Canadian Grand PrixAccident3339.05
1993 Brazilian Grand PrixAccident/Rain2938.08
1994 San Marino Grand PrixAccident16.04
1995 Belgian Grand PrixRain2833.04

Dataset Statistics

  • Total Records: 364 safety car periods
  • First Usage: 1973 Canadian Grand Prix
  • Common Causes: Accidents, debris, weather conditions

Red Flags

The red_flags.csv table contains information about race stoppages due to red flag conditions.

Schema

FieldTypeDescription
RacestringName of the Grand Prix
LapintegerLap number when red flag was shown
ResumedstringWhether race resumed (Y/N/R/S)
IncidentstringDescription of the incident causing red flag
ExcludedstringList of drivers excluded from the race

Resume Codes

  • Y - Yes, race resumed
  • N - No, race ended under red flag
  • R - Race restarted
  • S - Special circumstances

Sample Data

RaceLapResumedIncident
1950 Indianapolis 500138NRain.
1971 Canadian Grand Prix64NMist.
1973 British Grand Prix2YCrash involving Jody Scheckter, Jean-Pierre Beltoise…
1974 Brazilian Grand Prix32NRain.

Dataset Statistics

  • Total Records: 98 red flag incidents
  • First Usage: 1950
  • Common Causes: Weather, major accidents, track safety issues

Virtual Safety Car

The virtual_safety_car_estimates.json file contains estimated VSC (Virtual Safety Car) periods.

Structure

{
    "Race Name": [lap_numbers],
    "2015 Belgian Grand Prix": [20, 21],
    "2015 British Grand Prix": [32, 33, 34],
    "2015 Hungarian Grand Prix": [41, 42]
}
  • Keys: Race name (Grand Prix title)
  • Values: Array of lap numbers when VSC was active

Dataset Statistics

  • Format: JSON
  • First VSC: Introduced in 2015
  • Purpose: Track safety without physical safety car

Example Queries

Count safety car deployments per race

import pandas as pd

safety_cars = pd.read_csv('safety_cars.csv')
deployments = safety_cars['Race'].value_counts()
print(deployments.head(10))

Find longest safety car periods

longest_sc = safety_cars.nlargest(10, 'FullLaps')
print(longest_sc[['Race', 'Cause', 'FullLaps']])

Analyze red flag outcomes

red_flags = pd.read_csv('red_flags.csv')
resumed_count = red_flags['Resumed'].value_counts()
print("Red flag outcomes:")
print(resumed_count)

Find races with multiple safety cars

multiple_sc = safety_cars.groupby('Race').size()
races_with_multiple = multiple_sc[multiple_sc > 1].sort_values(ascending=False)
print(races_with_multiple.head(10))

Parse VSC data

import json

with open('virtual_safety_car_estimates.json', 'r') as f:
    vsc_data = json.load(f)

# Count VSC laps per race
for race, laps in vsc_data.items():
    print(f"{race}: {len(laps)} VSC laps")

Analyze safety interventions by year

# Extract year from race name
safety_cars['year'] = safety_cars['Race'].str.extract(r'(\d{4})')
sc_by_year = safety_cars.groupby('year').size()
print(sc_by_year)

Compare safety car vs red flag frequency

print(f"Safety car deployments: {len(safety_cars)}")
print(f"Red flag incidents: {len(red_flags)}")
print(f"Ratio: {len(safety_cars) / len(red_flags):.2f}:1")

Find common safety car causes

cause_counts = safety_cars['Cause'].value_counts()
print("Top causes for safety car:")
print(cause_counts.head(10))

Identify races with both SC and red flag

sc_races = set(safety_cars['Race'])
rf_races = set(red_flags['Race'])
both = sc_races & rf_races
print(f"Races with both safety car and red flag: {len(both)}")
for race in sorted(both):
    print(f"  - {race}")

Safety Intervention Types

Safety Car (SC)

  • Physical car leads the field
  • Drivers must slow down and bunch up
  • No overtaking allowed
  • Pit lane usually open

Virtual Safety Car (VSC)

  • Introduced in 2015
  • Drivers must maintain delta time (slow down by percentage)
  • No physical safety car on track
  • More flexible than full SC

Red Flag

  • Race completely stopped
  • Cars return to pit lane or grid
  • Used for serious incidents or conditions
  • Race may or may not resume

Notes

  • Safety car data is more complete for modern races
  • VSC estimates are based on lap time analysis (not official FIA data)
  • Red flags can occur during any session (practice, qualifying, race)
  • Multiple safety car periods can occur in a single race
  • \N represents missing or unavailable data
  • Race names should be matched with the races.csv table for full context
  • Weather-related interventions are common at specific circuits (e.g., Belgium, Japan)

Build docs developers (and LLMs) love