Appendix J — Data Sources: FastF1, OpenF1, Jolpica, and More

Every number in this book comes from data you can obtain yourself. This appendix is the field guide to where those data come from: what each source offers, how the book downloaded it, what it costs, what its terms ask of you, and how to bring the snapshot up to date after the next Grand Prix.

Chapter 2 tells the same story as a pipeline, with the cleaning decisions and the cross-checks between sources. Here the emphasis is reference: endpoints, files, credentials, licences and the refresh procedure. The counts below come from appendices/code/appendix_j_sources.py, which reads the archive on disk and makes no network calls:

python appendices/code/appendix_j_sources.py

A rule for this whole appendix: code that talks to a live API is shown, not run. The book's archive already holds the answers, the free services' capacity is shared by everyone who uses them, and a reproducible book must not depend on a server being up on the day you read it. When you do download, be polite, and read the provider's current terms first.


J.1 The sources at a glance

OpenF1 Jolpica-F1 FastF1
what it is a REST API of F1 timing data, one JSON record at a time the community-run successor to the Ergast API: results and history a Python library wrapping the official live-timing archive
seasons 2023 → today 1950 → today the official timing archive's seasons (see its documentation); Jolpica for history
what it has laps with sectors and mini-sectors, stints and compounds, pit, race control, weather, positions, intervals, overtakes, results, grids, team-radio index, championship, car telemetry and location results and grids from 1950, qualifying from 1994, race lap times and positions from 1996, pit-lane times from 2011, standings laps, stints, telemetry, position, weather, messages, all joined into one session object
what it lacks anything before 2023 compounds, telemetry, flags —
cost historical data free; live access during sessions is a paid option free the library is free; since 2026 its official timing source needs an F1 TV subscription
how the book uses it the archive behind every 2023–2026 analysis every historical analysis, and the official classification optional second opinion (§J.4); nothing depends on it
in the toolkit f1data, telemetry history not used

Three smaller families of sources supply facts that timing data can't: the FIA (regulations and decisions), suppliers and partners (Pirelli, Brembo, DHL), and company filings (Liberty Media). They live in data/reference/ and are described in §J.5.


J.2 OpenF1

What it is

OpenF1 is an independent, open-source project that publishes Formula 1 timing data through a REST API at https://api.openf1.org/v1/. You request an endpoint with filters in the query string and get back a JSON list of records. It is not an official Formula 1 service. Its documentation lives at openf1.org.

Two keys tie everything together. A meeting is a race weekend or a test; a session is one track session within it. Every record carries meeting_key and session_key, and driver-level records carry driver_number. The 2026 Las Vegas meeting, for example, is meeting_key 1300.

# Shown, not run: one request, the way scripts/fetch_openf1.py makes thousands of them
import requests
r = requests.get("https://api.openf1.org/v1/laps", params={"meeting_key": 1300}, timeout=120)
r.raise_for_status()
laps = r.json()                        # a list of dicts: one per driver per lap

Endpoints and where they end up

The book's downloader fetches two index endpoints, fourteen meeting-level endpoints and two telemetry endpoints. The build turns them into the processed tables of Appendix B §B.2.

endpoint requested per what it holds processed table
meetings season one row per weekend or test (used to build sessions)
sessions season one row per session: name, type, start, end, circuit sessions
drivers meeting who drove which car in which session, team and colour drivers
laps meeting lap and sector times, speed traps, mini-sector segment codes, pit-out flag laps
stints meeting compound, first and last lap, tyre age at start stints (and joined to laps)
pit meeting pit-lane and (where published) stationary times pit
race_control meeting every race-control message: flags, SC/VSC, penalties, deleted laps race_control, track_periods
weather meeting air and track temperature, humidity, rain flag, wind, pressure, about once a minute weather
session_result meeting classification of each session results
starting_grid meeting the grid (filed under the qualifying session) results.grid_position
position meeting running position, one row per change positions
intervals meeting gap to leader and to the car ahead, every few seconds in races intervals
overtakes meeting changes of position the timing saw (not clean passes) overtakes
team_radio meeting links to audio clips (no transcripts) team_radio
championship_drivers, championship_teams meeting standings before and after each race championship
car_data session × driver speed, RPM, gear, throttle, brake on/off, DRS at about 3.7–4 Hz raw files, read by telemetry
location session × driver x, y, z position (the book fetches it for qualifying-type sessions) raw files, read by telemetry

The archive on disk

The downloader writes one file per endpoint per meeting (data/raw/openf1/<endpoint>/<meeting_key>.json) and one gzip file per driver per session for telemetry (car_data/<session_key>_<driver>.json.gz). At the time of writing:

== J.2 OpenF1 raw archive (data/raw/openf1/)
meetings.json: 99 meetings; sessions.json: 470 sessions; years [2023, 2024, 2025, 2026]
            endpoint  files  empty_files    MB
            car_data   4703            0 877.9
championship_drivers     99            7   0.4
  championship_teams     99            8   0.2
             drivers     99            1   4.2
           intervals     99            8 368.4
                laps     99            3 141.3
            location   2353            0 291.0
           overtakes     99            8   4.2
                 pit     99           12   5.1
            position     99            3  43.2
        race_control     99            3   7.6
      session_result     99            3   1.9
       starting_grid     99            8   0.2
              stints     99            3   6.2
          team_radio     99            9   4.7
             weather     99            3  12.4
total: 8,442 files, 1,769.0 MB

The 99 meetings are the 91 Grands Prix in the snapshot, five testing meetings and three meetings that OpenF1 lists but that did not run (the 2023 Emilia Romagna GP and the 2026 Bahrain and Saudi Arabian GPs). Those three are the empty laps files. An empty file holds [], which records "OpenF1 had nothing" as a fact. The twelve empty pit files are those three meetings, three of the five testing meetings (2023 and both 2026 tests), and the six 2023 rounds from Bahrain to Monaco that ran, for which OpenF1 has no pit data at all. Telemetry is the bulk of the archive: 4,703 car-data files and 2,353 location files, about 1.2 GB of the 1.8 GB total.

The free historical tier, as we experienced it

The book's archive was downloaded from the free historical service between the 2023 season opener and the 2026 Las Vegas GP. We did not test the service's limits; we wrote a downloader that stays well inside them, and its log records how it behaved.

MIN_GAP = 2.05  # seconds between request starts (OpenF1 free tier: ~30 requests/minute)

def get(url, params, tries=8):
    for attempt in range(tries):
        with _lock:                                    # one clock shared by all worker threads
            wait = _last[0] + MIN_GAP - time.time()
            if wait > 0:
                time.sleep(wait)
            _last[0] = time.time()
        r = requests.get(url, params=params, timeout=120)
        if r.status_code == 200:
            return r.json()
        if r.status_code == 404:                       # OpenF1's "no results"
            return []
        if r.status_code in (429, 500, 502, 503, 504): # rate limited or server trouble: back off
            time.sleep(min(60, 4 * 2 ** attempt)); continue
        if r.status_code == 422:                       # too much data for one query: caller splits it
            return None

What this encodes, and what we saw:

  • About 30 requests per minute. The script spaces request starts at least 2.05 s apart, across all worker threads. Its log shows the telemetry download running at a steady rate:

text == J.2 download rate recorded in data/raw/openf1_fetch.log progress lines: 19; 1800 files in 61.6 min = 29.2 requests/min run ended with an exception after retries: True

  • 429 means slow down. When the service answers HTTP 429 (Too Many Requests), or a 5xx error, the script waits 4, 8, 16, 32 and then 60 s before trying again. Retrying immediately would only make it worse.
  • 422 means ask for less. Some meeting-level requests (intervals for a whole weekend, for example) are too large for one response. The script then asks session by session, and if that is still too much, driver by driver.
  • 404 means nothing there. OpenF1 answers 404 for an empty result; the script saves [].
  • Things fail, so make the download resumable. The logged run above ended after eight failed attempts at a single location request. Because every file is written atomically (to a .tmp name, then renamed) and existing files are skipped, rerunning the script simply carried on where it stopped.

The limits and terms of a free service are the provider's to set and can change. The figures above are what our downloader used and recorded in late 2026, not a guarantee. Check openf1.org before you download anything, and keep the same courtesy: one client, spaced requests, back-off on 429.

The live tier

OpenF1's historical archive is free. Access to data during a live session is offered separately, as a paid option, at the time of writing. This book uses no live data at all: every analysis runs on completed sessions from the archive. If you want to build a live dashboard, read OpenF1's current documentation for how live access works and what it costs. The toolkit's telemetry.*(…, allow_fetch=True) option fetches a missing historical file once, politely (at least 2.1 s between calls); it is off by default and never used in chapter code.


J.3 Jolpica-F1

What it is

The Ergast API served historical F1 results to researchers and fans for years, then shut down. Jolpica-F1 is the community project that took over its role. Its API keeps Ergast's paths and response format (note /ergast/f1 in the base URL below), so most code written for Ergast needs only the new base URL. The project lives on GitHub (github.com/jolpica/jolpica-f1).

Jolpica offers two ways in, and the book uses both.

The CSV dump

Jolpica publishes its whole database as a zip of CSV files. The dump is "delayed": it lags the live API. The book's copy is dated 2026-11-09 and was downloaded on 2026-11-24.

== J.3 Jolpica CSV dump (data/raw/jolpica/)
zip: 14.8 MB
                                  file   rows   MB
              formula_one_baseteam.csv      0  0.0
formula_one_championshipadjustment.csv      3  0.0
    formula_one_championshipsystem.csv     11  0.0
               formula_one_circuit.csv     78  0.0
                formula_one_driver.csv    885  0.1
    formula_one_driverchampionship.csv  37065  1.6
                   formula_one_lap.csv 746897 37.3
               formula_one_penalty.csv      0  0.0
               formula_one_pitstop.csv  13203  0.8
           formula_one_pointsystem.csv     24  0.0
                 formula_one_round.csv   1173  0.1
            formula_one_roundentry.csv  27768  1.1
                formula_one_season.csv     77  0.0
               formula_one_session.csv   5130  0.4
          formula_one_sessionentry.csv  52256  3.4
                  formula_one_team.csv    214  0.0
      formula_one_teamchampionship.csv  14667  0.6
            formula_one_teamdriver.csv   3634  0.1

The dump is normalised: a round belongs to a season; a session (race, sprint, Q1, Q2, Q3, …) belongs to a round; a roundentry links a teamdriver (a driver at a team in a season) to a round; and a sessionentry (one car's result in one session) links the two. Lap times and pit stops hang off session entries. scripts/build_jolpica.py flattens this into the tidy tables results, sprint_results, qualifying, laps, pitstops, sprint_pitstops and the two standings tables. Two of its decisions matter when you read the history tables:

  • Qualifying times come from the lap table. The best Q1, Q2 and Q3 times are the minimum non-deleted lap in each session, and the official position comes from the last knockout session the driver took part in.
  • Sprint pit stops are split out. The dump's pit-stop file mixes sprint and race stops (13,203 rows in the CSV, before the API top-up); the build keeps the 13,052 race stops in pitstops and the 174 sprint stops in sprint_pitstops.

The API, for rounds after the dump

Races that happened after the dump date are "topped up" from the live API. The base URL and the pattern are Ergast's:

# Shown, not run: the top-up loop in scripts/build_jolpica.py, simplified
API = "https://api.jolpi.ca/ergast/f1"

def api(path):                                   # e.g. path = "2026/21/laps"
    out, off = [], 0
    while True:
        r = requests.get(f"{API}/{path}.json", params={"limit": 100, "offset": off}, timeout=60)
        d = r.json()["MRData"]                   # every Ergast-style response is wrapped in MRData
        out.append(d)
        off += 100
        if off >= int(d["total"]):               # page through until every record is fetched
            return out
        time.sleep(0.6)                          # be polite between pages

for kind in ("results", "sprint", "qualifying", "laps", "pitstops"):
    pages = api(f"2026/21/{kind}")

Responses are paged (limit and offset), so a full race of lap times takes many requests; the script sleeps between pages and retries with a growing wait if a request fails. In this snapshot one round was topped up this way: 2026 round 21, Las Vegas. Check the project's documentation for its current rate limits before you run anything like this.

What Jolpica doesn't have

No tyre compounds, no telemetry, no flags or race-control messages, no stationary pit-stop times (its duration is pit-lane time) and, from 2023, no retirement causes in the status text. Safety-car laps before 2023 therefore come from the toolkit's lap-time detector, with its measured error rate (Chapter 14).


J.4 FastF1

What changed in 2026

FastF1 is the best-known Python library for F1 data: well designed, pandas-based, and for years the default way in. It reads the official live-timing archive (livetiming.formula1.com). Since 2026 that source requires an F1 TV subscription, and FastF1 3.9 signs in to a Formula 1 account and sends the subscription token with each request. The version installed alongside this book is 3.9.2. Its documentation lives at docs.fastf1.dev.

That is why the book does not depend on FastF1: its promise is that every number comes from data you can download free of charge. FastF1 remains a fine second opinion if you have a subscription.

Signing in (shown, not run)

FastF1 3.9 has a small command-line tool for the sign-in. The default method reads your credentials from two environment variables and prompts for any that are missing; the token it obtains is stored on your machine and reused until it expires.

# Shown, not run. Requires an active F1 TV subscription.
# Option 1: credentials from the environment (the default "password" method)
set [email protected]          # PowerShell: $env:F1_USERNAME = "[email protected]"
set F1_PASSWORD=...                      # never put a password in a script or a notebook you share
python -m fastf1 auth f1tv --authenticate

python -m fastf1 auth f1tv --status      # shows whether the stored token is valid, and its expiry
python -m fastf1 auth f1tv --clear       # deletes the stored token

A second, browser-based method exists (--method browser, or the environment variable FASTF1_AUTH_METHOD=browser); both methods yield the same stored token.

Loading a session (shown, not run)

# Shown, not run: FastF1 3.9 with an F1 TV subscription and a stored token
import fastf1

fastf1.Cache.enable_cache("fastf1_cache")             # a local folder: repeat loads come from disk
session = fastf1.get_session(2025, "Japanese Grand Prix", "Q")
session.load()                                        # laps, timing, telemetry, weather, messages

lap = session.laps.pick_drivers("VER").pick_fastest()
tel = lap.get_car_data().add_distance()               # Speed, RPM, nGear, Throttle, Brake, DRS + Distance
quick = session.laps.pick_quicklaps()                 # laps within 107 % of the session's best lap

# The same lap from the book's archive, no account needed:
#   from toolkit import f1data, telemetry
#   tel = telemetry.fastest_lap_telemetry(f1data.session(2025, "Japanese", "Q"), "VER")

Enable the cache before anything else. FastF1 makes many requests per session, and the cache keeps you from repeating them, which is both faster and kinder to the server.

How FastF1's columns map onto the book's tables

If you load the same session both ways, this is how the columns correspond. The FastF1 column lists are read from the installed package (offline); the script checks that each of our columns exists ([ok]).

== J.4 FastF1 (installed package, read offline) -> the book's tables
fastf1 3.9.2 | Laps.QUICKLAP_THRESHOLD = 1.07
-- FastF1 Laps: 31 columns
  Time                   -> laps.date_end (as session time) [ok]
  Driver                 -> laps.acronym [ok]
  DriverNumber           -> laps.driver_number [ok]
  LapTime                -> laps.lap_duration [ok]
  LapNumber              -> laps.lap_number [ok]
  Stint                  -> laps.stint [ok]
  PitOutTime             -> laps.is_pit_out_lap (flag, not a time) [ok]
  PitInTime              -> laps.is_pit_in_lap (flag, not a time) [ok]
  Sector1Time            -> laps.duration_sector_1 [ok]
  Sector2Time            -> laps.duration_sector_2 [ok]
  Sector3Time            -> laps.duration_sector_3 [ok]
  Sector1SessionTime     -> -.not stored
  Sector2SessionTime     -> -.not stored
  Sector3SessionTime     -> -.not stored
  SpeedI1                -> laps.i1_speed [ok]
  SpeedI2                -> laps.i2_speed [ok]
  SpeedFL                -> -.no finish-line speed in OpenF1 laps
  SpeedST                -> laps.st_speed [ok]
  IsPersonalBest         -> -.compute: lap == driver's running minimum
  Compound               -> laps.compound [ok]
  TyreLife               -> laps.tyre_age (check the counting offset on a known stint) [ok]
  FreshTyre              -> stints.tyre_age_at_start == 0 [ok]
  Team                   -> laps.team_ref (Jolpica id) [ok]
  LapStartTime           -> laps.date_start (as session time) [ok]
  LapStartDate           -> laps.date_start [ok]
  TrackStatus            -> laps.track_status (derived from race control; different codes) [ok]
  Position               -> laps.position_end [ok]
  Deleted                -> race_control.parse 'LAP ... DELETED' messages
  DeletedReason          -> race_control.message text
  FastF1Generated        -> -.no equivalent
  IsAccurate             -> laps.is_clean is the nearest idea (a different rule) [ok]
-- FastF1 Telemetry: 19 columns
  X                      -> location.x [ok]
  Y                      -> location.y [ok]
  Z                      -> location.z [ok]
  Status                 -> -.on/off-track flag: not stored
  Speed                  -> car_data.speed [ok]
  RPM                    -> car_data.rpm [ok]
  Throttle               -> car_data.throttle [ok]
  Brake                  -> car_data.brake (0/100; FastF1 gives True/False) [ok]
  DRS                    -> car_data.drs [ok]
  nGear                  -> car_data.n_gear [ok]
  Source                 -> -.not stored
  Date                   -> car_data.date [ok]
  Time                   -> lap_telemetry.time_s (from the lap start) [ok]
  SessionTime            -> -.compute: date - session start
  Distance               -> lap_telemetry.distance_m [ok]
  RelativeDistance       -> -.compute: distance_m / lap length
  DifferentialDistance   -> -.compute: distance_m.diff()
  DriverAhead            -> -.compute from intervals
  DistanceToDriverAhead  -> -.compute from intervals x speed
-- FastF1 SessionResults: 22 columns
  DriverNumber           -> results.driver_number [ok]
  BroadcastName          -> drivers.broadcast_name [ok]
  Abbreviation           -> drivers.acronym [ok]
  DriverId               -> drivers.driver_ref [ok]
  TeamName               -> drivers.team_name [ok]
  TeamColor              -> drivers.team_colour [ok]
  TeamId                 -> drivers.team_ref [ok]
  FirstName              -> drivers.first_name [ok]
  LastName               -> drivers.last_name [ok]
  FullName               -> drivers.full_name [ok]
  HeadshotUrl            -> drivers.headshot_url [ok]
  CountryCode            -> drivers.country_code [ok]
  Position               -> results.position [ok]
  ClassifiedPosition     -> results.jolpica_position [ok]
  GridPosition           -> results.jolpica_grid / grid_position [ok]
  Q1                     -> results.q1_s [ok]
  Q2                     -> results.q2_s [ok]
  Q3                     -> results.q3_s [ok]
  Time                   -> results.duration_s / gap_to_leader_s [ok]
  Status                 -> results.jolpica_status [ok]
  Points                 -> results.points [ok]
  Laps                   -> results.number_of_laps [ok]

Four differences deserve care when you compare the two:

  1. Times and timedeltas. FastF1 stores lap and sector times as pandas Timedeltas and session times relative to the session start; the toolkit stores durations as float seconds and instants as UTC timestamps. Convert with .dt.total_seconds() before comparing.
  2. "Quick laps" are not clean laps. pick_quicklaps() keeps laps within 107 % of the session's best lap (QUICKLAP_THRESHOLD = 1.07); the book's clean lap uses 107 % of the driver's own stint median, plus the flag, pit and lap-1 rules. Chapter 2 shows the two rules disagreeing about 8,266 race laps.
  3. Track status codes. FastF1's TrackStatus comes from the official track-status feed; the toolkit's track_status is derived from race-control messages with its own window rules (Appendix B §B.5). They usually agree on SC and VSC laps; check before relying on yellow-flag laps.
  4. Brake. FastF1 gives a boolean; OpenF1 gives 0 or 100. Neither is pressure.

FastF1 also has an ergast interface for historical results. It now points at Jolpica, so its history is the same data as the book's history module.


J.5 Other sources: FIA, Pirelli, Brembo, DHL and Liberty Media

Timing data can't tell you the minimum car mass, the tyre compound range, a team's prize money or the fastest pit stop of the year. Those facts come from documents, and the book keeps them in small reference tables in data/reference/. Every CSV row carries the source's name, the URL that was actually loaded and the date it was retrieved; anything that could not be confirmed is written NOT FOUND. The tables are listed column by column in Appendix B §B.4.

== J.5 reference tables by source type / authority
f1_business.csv: primary (company filing) 129, press 60, primary (official F1/FIA/team) 16, derived from primary 9
records.csv: official (F1) 26, press 16, official (F1/DHL), derived count 15, encyclopedia (secondary) 8, official (F1/DHL) 6, official (DHL) 5, team claim 4, official (F1), derived comparison 1
champions_context.csv: official (F1 media) 11, press 8, official (FIA) 7, reference site 5, secondary (encyclopedia) 4, official (F1/FIA) 3, team/supplier 2, official 2
engineering_reference.csv: team/supplier claim 100, press estimate 43, official 26, academic 7
rows by source domain (all reference CSVs, top 15):
  formula1.com                 514
  fia.com                      258
  sec.gov                      98
  conceptcarz.com              72
  en.wikipedia.org             63
  api.fia.com                  49
  libertymedia.com             40
  motorsport.com               35
  pitpass.com                  24
  the-race.com                 24
  flowracers.com               23
  press.pirelli.com            20
  pirelli.com                  13
  skysports.com                12
  fieldlevelmedia.com          12
engineering_reference rows citing Brembo: 84 (topics: ['brakes', 'brembo-circuit', 'g-loads'])
dhl_pitstops: 215 rows, seasons 2017-2026, driver NOT FOUND 188
tyres.csv rows citing Pirelli: 46 of 64
f1_business.csv rows citing Liberty Media / SEC filings: 139 of 220
regulations_by_season.csv rows citing FIA: 198 of 225; NOT FOUND values: 4

Each family of sources has its own character, and the source type in each row tells you how much weight it bears.

The FIA (fia.com) publishes the Technical, Sporting and Financial Regulations as PDFs, issue by issue, along with stewards' decisions and cost-cap rulings. These are primary sources: when a rule matters, the regulation PDF is the authority, with its issue number and date. 198 of the 225 rows in regulations_by_season.csv cite an FIA document. Regulations change during a season (the 2026 energy rules changed twice), so regulations_2026.md tags those changes [IN-SEASON]; always check the issue that applied on the date you care about. Four values in that table could not be confirmed and are marked NOT FOUND, including the race fuel-mass limit for 2022–2025.

Pirelli (press.pirelli.com) is the sole tyre supplier and publishes race previews, compound nominations and occasional technical figures. 46 of the 64 rows in tyres.csv cite Pirelli material. Treat previews as the supplier's own description, not measurements you can check, and always give the year: the water-dispersal figures, for example, are 2014–2020 numbers with no 2026 equivalent.

Brembo supplies brakes to most of the grid and publishes a braking preview for each circuit: estimated peak deceleration, braking time per lap, the hardest stop. 84 rows of engineering_reference.csv come from those previews, often via reprints on other sites, which is why conceptcarz.com appears among the domains. They are marked team/supplier claim: useful context, not measurements. Chapter 7 compares them with what the telemetry shows, and the comparison is instructive.

DHL is the sponsor of the fastest-pit-stop award, and formula1.com publishes the award results race by race. dhl_pitstops.csv holds 215 rows, one per race from 2017 to 2026, with the team and the stationary time. The driver is NOT FOUND in 188 of them: the source pages mostly don't name one before 2026. These are the only stationary-time figures in the book's data that come from the official timing, and they cover only the fastest stop of each race. Chapter 34 uses them alongside the pit-lane times.

Liberty Media, which owns Formula 1, files annual (10-K) and quarterly reports with the US Securities and Exchange Commission, published on sec.gov's EDGAR system, and posts results releases on libertymedia.com. These are the primary source for Formula 1's revenue, operating income and payments to teams. 139 of the 220 rows in f1_business.csv cite them. Liberty reports the revenue mix as percentages, so dollar splits in the table are derived and labelled as such, and the 2026 figures are nine-month figures because the full year has not been reported. Payments to individual teams are not in the filings; where the book quotes them, the source is press reporting, and the row says so. Chapter 33 is built on this table.

Press and reference sites (motorsport.com, The Race, Sky Sports, Wikipedia and others) fill the gaps. The book cites them as "reported by" and never treats them as primary. Wikipedia rows are labelled secondary.

If you extend the reference tables yourself, keep the same discipline: one row per fact, the URL you actually loaded, the date, and NOT FOUND rather than a remembered number.


J.6 Data licensing and attribution

This section describes the terms in general, as the book understands them. It is not legal advice, and terms change. Read the current terms on each provider's site before you republish anything.

Formula 1 data is copyrighted by its owners. The timing data that OpenF1 and FastF1 serve originate with Formula 1's official timing. The names and logos of Formula 1, its teams and its partners are trademarks of their owners. Nothing in this book is endorsed by Formula 1, the FIA, any team or any of the data providers. The book's analyses, and yours, are for personal and educational use.

OpenF1. OpenF1 is an unofficial project that is not associated with Formula 1. Its documentation at openf1.org sets out how the data may be used and how the live tier is offered. Use the historical API within its published limits, credit OpenF1 when you show its data, and don't present it as official data.

Jolpica-F1. Jolpica is a community, open-source project (github.com/jolpica/jolpica-f1). Its repository states the licence for its code and the terms for its data and API; read them there. Credit Jolpica (and, where it helps the reader, the Ergast project it succeeded) when you use its data.

FastF1. The library is open source; the data it reads since 2026 come through your own F1 TV subscription, under that subscription's terms. Don't redistribute data obtained that way.

Reference tables. Each row in data/reference/ points to its source. Regulations and filings are public documents; previews, articles and award pages belong to their publishers. Quote short facts with the source, as the book does, rather than copying documents.

The book itself (text and code) is free under CC-BY-SA-4.0. That licence covers what this book wrote. It does not relicense anyone else's data.

How the book attributes data, and how you should. Every chart carries a source line, generated by f1data.source_note(session), for example Data: OpenF1 (2025 Mexico City Grand Prix, Race). Historical charts say Data: Jolpica-F1. Tables quoting reference rows give the source named in the row. If you publish an analysis built on the toolkit, do the same: name the source and the session on every chart, and link to the provider's site.

What not to do: - don't republish the raw archive or the processed tables as a dataset of your own; - don't use the data commercially without checking the terms of every source involved; - don't strip source lines from charts; - don't put your F1 account credentials in code or notebooks that you share.


J.7 How to refresh the data for a new race

The archive is a snapshot: in this edition, everything through the 2026 Las Vegas GP (round 21). When the next race has run, six steps bring it up to date. Run them from the book root. Steps 1 and 2 use the network; nothing after them does.

1. Move the OpenF1 snapshot date and download. Open scripts/fetch_openf1.py and change SNAPSHOT_END to a date just after the new race (and add the year to YEARS at the start of a new season):

SNAPSHOT_END = "2026-11-24T00:00:00+00:00"   # Las Vegas GP (R21, 2026-11-22) is the last event included
YEARS = [2023, 2024, 2025, 2026]

Then download (shown, not run):

python scripts/fetch_openf1.py --no-telemetry    # timing first: 14 requests per new meeting (more if split)
python scripts/fetch_openf1.py                   # then telemetry: one request per driver per session

The downloader skips every file that already exists. That makes it resumable, and it has one consequence: if you downloaded a meeting while the weekend was still running, its files are incomplete and will not be refetched. Delete that meeting's files (data/raw/openf1/*/<meeting_key>.json) before you rerun. At about 29 requests per minute, the timing for a new meeting takes under a minute. Telemetry needs one request per driver per session: with 22 cars, 66 requests for a standard weekend (race car data, plus qualifying car data and location) and 132 for a sprint weekend, so roughly 2–5 minutes.

2. Update the history. Change SNAPSHOT_DATE in scripts/build_jolpica.py. Rounds after the CSV dump's date and up to SNAPSHOT_DATE are topped up from the Jolpica API automatically when you build. When a newer dump is published, unzip it into data/raw/jolpica/csv/ instead and fewer rounds need the top-up.

python scripts/build_jolpica.py      # CSV dump + API top-up -> data/processed/history/

3. Rebuild the OpenF1 tables.

python scripts/build_openf1.py       # data/raw/openf1 -> data/processed/openf1/  (about a minute)

The build prints its checks as it runs: drivers it could not map to a Jolpica ref, phantom laps dropped, stint boundaries moved. A new driver who is not in Jolpica (an FP1-only driver, typically) needs an entry in DRIVER_OVERRIDES at the top of the build script.

4. Refresh the documentation of the snapshot.

python scripts/data_inventory.py     # counts -> toolkit/_inventory.md and toolkit/README.md
python scripts/validate_detector.py  # the SC detector's precision and recall
python appendices/code/build_appendix_b.py   # this book's data dictionary and caveat evidence
python -m pytest toolkit/tests -q    # the toolkit's tests on the new data

5. Check the new race before you trust it. Look for the caveats of Appendix B §B.7 in the new data: missing laps against Jolpica (boxbox.data.RaceData.load(...).coverage()), red-flag messages, phantom stints, frozen telemetry on the laps you plan to use. A new season may bring new message wordings, as 2026 did for red flags and the VSC.

6. Rerun what depends on it. Any open Python session needs f1data.reload() to forget the cached tables. Chapter scripts rerun with scripts/run_all_code.py, which runs each script from its chapter folder; expect the printed numbers in the chapters to move slightly as the snapshot grows.

📋 Try it: Analyze this session. After refreshing, pick the newest race and run Appendix A's script with your session in place of the 2025 Mexico City GP. Do the clean-lap share, the stint table and the degradation medians look like the ones printed there? If not, which caveat explains it?