Skip to main content

Overview

The race-related tables form the core structure of the dataset, defining when and where Formula 1 races occurred. These three tables work together to provide complete context for every Grand Prix event.

races.csv

The main table containing individual race events, including session schedules and timing information.

Schema

raceId
integer
required
Unique identifier for each race. Primary key.Example: 1061
year
integer
required
The year of the race. Links to seasons.year.Example: 2009
round
integer
required
The round number of the race in the season (1-based).Example: 1 (first race of the season)
circuitId
integer
required
Foreign key to circuits.csv. Identifies which circuit hosted the race.Example: 1 (Albert Park)
name
string
required
The official name of the Grand Prix.Example: "Australian Grand Prix"
date
date
required
The date of the race in YYYY-MM-DD format.Example: "2009-03-29"
time
time
The time of the race start in HH:MM:SS format (UTC). May be \N for older races.Example: "06:00:00"
url
string
Wikipedia URL for the race event.Example: "http://en.wikipedia.org/wiki/2009_Australian_Grand_Prix"
fp1_date
date
Date of Free Practice 1 session. May be \N for older races.Example: "2024-03-07"
fp1_time
time
Time of Free Practice 1 session (UTC). May be \N for older races.Example: "11:30:00"
fp2_date
date
Date of Free Practice 2 session. May be \N for older races.
fp2_time
time
Time of Free Practice 2 session (UTC). May be \N for older races.
fp3_date
date
Date of Free Practice 3 session. May be \N for older races or sprint weekends.
fp3_time
time
Time of Free Practice 3 session (UTC). May be \N for older races or sprint weekends.
quali_date
date
Date of Qualifying session. May be \N for older races.
quali_time
time
Time of Qualifying session (UTC). May be \N for older races.
sprint_date
date
Date of Sprint Race. Only populated for races with sprint format (2021+).
sprint_time
time
Time of Sprint Race (UTC). Only populated for races with sprint format (2021+).

Sample Data

raceIdyearroundcircuitIdnamedatetime
1200911Australian Grand Prix2009-03-2906:00:00
2200922Malaysian Grand Prix2009-04-0509:00:00
32009317Chinese Grand Prix2009-04-1907:00:00
Session Data Availability: Free practice and qualifying session dates/times are more complete for recent seasons (2015+). Older races may have \N values for these fields.

circuits.csv

Information about each circuit where Formula 1 races have been held, including geographic location.

Schema

circuitId
integer
required
Unique identifier for each circuit. Primary key.Example: 1
circuitRef
string
required
Short reference name for the circuit (URL-friendly).Example: "albert_park"
name
string
required
Official name of the circuit.Example: "Albert Park Grand Prix Circuit"
location
string
required
City or area where the circuit is located.Example: "Melbourne"
country
string
required
Country where the circuit is located.Example: "Australia"
lat
float
required
Latitude coordinate of the circuit.Example: -37.8497
lng
float
required
Longitude coordinate of the circuit.Example: 144.968
alt
integer
Altitude of the circuit in meters above sea level.Example: 10
url
string
Wikipedia URL for the circuit.Example: "http://en.wikipedia.org/wiki/Melbourne_Grand_Prix_Circuit"

Sample Data

circuitIdcircuitRefnamelocationcountrylatlngalt
1albert_parkAlbert Park Grand Prix CircuitMelbourneAustralia-37.8497144.96810
2sepangSepang International CircuitKuala LumpurMalaysia2.76083101.73818
3bahrainBahrain International CircuitSakhirBahrain26.032550.51067
Coordinate Precision: Latitude and longitude values are provided with high precision for mapping and visualization purposes.

seasons.csv

Simple metadata table for Formula 1 seasons.

Schema

year
integer
required
The year of the Formula 1 season. Primary key.Example: 2009
url
string
Wikipedia URL for the season.Example: "http://en.wikipedia.org/wiki/2009_Formula_One_season"

Sample Data


Relationships Between Tables

seasons (year)

races (year) → circuits (circuitId)

[Links to all performance tables]

Key Relationships

  1. seasons → races: Each race belongs to a season via the year field
  2. races → circuits: Each race is held at a specific circuit via circuitId
  3. races → results/qualifying/etc: Each race has multiple performance records

Example Query: Get All Races at a Circuit

SELECT r.year, r.round, r.name, r.date, c.name as circuit_name
FROM races r
JOIN circuits c ON r.circuitId = c.circuitId
WHERE c.circuitRef = 'monaco'
ORDER BY r.year, r.round

Example Query: Get Full Race Weekend Schedule

SELECT 
    r.name,
    r.date as race_date,
    r.time as race_time,
    r.fp1_date,
    r.fp1_time,
    r.fp2_date,
    r.fp2_time,
    r.fp3_date,
    r.fp3_time,
    r.quali_date,
    r.quali_time,
    r.sprint_date,
    r.sprint_time,
    c.name as circuit,
    c.location,
    c.country
FROM races r
JOIN circuits c ON r.circuitId = c.circuitId
WHERE r.year = 2024
ORDER BY r.round

Data Usage Tips

Sprint Weekend Format: On sprint weekends, FP3 is replaced by the Sprint Race. Check sprint_date to identify sprint weekends.
Historical Changes: Circuit configurations and names have changed over time. The same circuitId may represent different layouts across different eras.
Time Zones: All times are stored in UTC. Convert to local time using the circuit’s lat/lng coordinates.

Build docs developers (and LLMs) love