How to Use This Book

This book has 40 chapters in seven parts. You can read it cover to cover, and the chapters are ordered so that this works. Most readers won't, and you don't need to. Pick the learning path below that matches why you opened the book, follow its chapters in order, and dip into the others when a cross-reference pulls you there.

The seven parts

Part Chapters What it covers
I — The Physics of Formula One 1–11 Forces, the data pipeline, aero, tyres, the power unit, braking, suspension, the driver, the circuit, lap simulation
II — Race Strategy 12–18 Pit-stop optimisation, undercut and overcut, safety cars, rain, qualifying, the start, the strategy room
III — Performance Analytics 19–24 Lap and sector analysis, race pace, driver comparison, degradation models, telemetry, team trends
IV — Data Science for F1 25–27 Visualisation, prediction, Monte Carlo race simulation
V — Regulations, Development, History, and Business 28–33 The rules, the 2026 reset, car development, the cost cap, the eras, the money
VI — Specialized Analytics 34–38 Pit stops, overtaking, weather, reliability and penalties, betting
VII — Beyond F1 39–40 Other series, and the capstone race-strategy simulator

The five learning paths

Each chapter opens with a short story and then tells you which tracks it serves. These are the fixed routes through the book.

🏎️ Fan Track

Chapters 1, 3, 4, 6–10, 12–18, 19, 21, 28–29 and 32–35, plus Chapters 22 and 27 read without the code.

You want to understand what you see on a race weekend: why the car sticks, why the team pitted, what the safety car changed, who is genuinely quick. Skip the code blocks if you like; every one is followed by a plain-English account of what the output means. Start with Chapter 1.

🔧 Engineering Track

Chapters 1–11, then 12, 20, 22, 23 and 28–30.

You want the physics and the models: forces and grip, aerodynamics, tyre mechanics and Pacejka's Magic Formula, the hybrid power unit, braking energy, load transfer, and a lap simulator built from first principles. Then you see how those models meet the strategy and regulation problems teams actually solve. Start with Chapter 1 and do not skip Chapter 2.

📊 Analytics Track

Chapters 1–2, 12–14, 19–27, 34–37 and 40.

You want to work with real, messy data and build models that survive validation: cleaning rules, fuel correction, mixed models for degradation, driver ratings with uncertainty, prediction with walk-forward testing, and Monte Carlo. You will finish by assembling the Box Box simulator in Chapter 40.

🎮 Sim Racer Track

Chapters 1, 3, 4, 5, 7–11, 16, 17, 19 and 23.

You want to read telemetry like an engineer and find time: where the tyre's grip peaks, how braking really looks in the data, how the circuit shapes the car, how qualifying laps are built, and how to compare two laps without fooling yourself. The path ends in Chapter 23, the telemetry deep dive.

🎰 Betting Track

Chapters 1–2, 12–14, 16, 19–22, 26–27 and 36–38.

You want calibrated probabilities and an honest view of where an edge might live. That means base rates (how often pole wins, how often a safety car comes out), the strategy and pace models behind them, prediction, simulation, weather, reliability, and finally the arithmetic of odds, overround and stake sizing in Chapter 38.

The paths overlap on purpose. Chapters 1, 12 and 19 appear on most of them because they carry ideas everything else depends on: the physics of grip, the pit-stop trade-off, and how to read a lap.

Inside a chapter

Every chapter folder holds the same set of files:

File What it's for
index.md The chapter itself
exercises.md Graded exercises, from quick checks to open-ended projects
quiz.md A self-test with answers
case-study-01.md, case-study-02.md Two longer worked analyses on real sessions
key-takeaways.md A one-page summary for review
further-reading.md Books, papers and documentation worth your time
code/ Every script the chapter runs, plus project_checkpoint.py
images/ The charts, all generated by the scripts in code/

The callouts

The chapters use a small set of marked boxes. Each icon means the same thing everywhere.

Callout What it means
🏎️ Fan Track · 🔧 Engineering Track · 📊 Analytics Track · 🎮 Sim Racer Track · 🎰 Betting Track Routing after the opening story: what this chapter offers your path
📐 Definition The exact definition of a metric or concept, as the code computes it
🔍 Why this works The physical or statistical reason behind a method or result
🧩 Productive struggle A problem posed before the method. Try it first; the struggle is the point
🔄 Check your understanding A short check roughly every 1,500 words, with the answer folded underneath
📋 Try it A hands-on task on real data: Analyze this session, Build the strategy, Compare these drivers, Predict the race, Design the setup, or Call the pit stop (decide first, then open the reveal)
📺 On the broadcast What a concept looks like on TV, and what the commentator's phrase means in the numbers
⚠️ Common pitfall A mistake that is easy to make with this data, and how to avoid it
🧪 Illustrative model The result depends on car parameters that are not public; the values are stated assumptions, not team data
🚪 Threshold concept An idea that, once it clicks, changes how you see the rest of the subject
🪞 Learning check-in A pause to reflect on how your understanding has changed (Chapters 4, 8, 12, 16, 20, 24, 28, 32, 36 and 40)
📊 Figure (described) A text description of each chart: what it shows and the takeaway

How the code is organised

All the code is Python, and all of it runs offline against the book's data snapshot. No chapter script makes a network call.

formula-one-analytics/
├── part-01-physics/
│   └── chapter-01-what-makes-an-f1-car-fast/
│       ├── index.md
│       ├── code/            01_first_speed_trace.py, 02_..., project_checkpoint.py
│       └── images/          ch01-fig-01-....png (written by the scripts)
├── toolkit/                 shared loaders and metrics: f1data, history, metrics, telemetry, plots
├── project/boxbox/          the race-strategy simulator you build, one module per chapter
├── data/
│   ├── processed/           the tidy tables every script reads (OpenF1 and Jolpica)
│   └── reference/           sourced tables: regulations, tyres, cost cap, records, business
└── scripts/                 the download and build scripts that produce data/processed/
  • Chapter code/ folders. Scripts are numbered in the order the chapter uses them (01_<topic>.py, 02_<topic>.py, …). Each opens with a docstring saying what it shows and which section it belongs to. Run them from the chapter folder. Every output block you see in a chapter was pasted from a real run of the script named next to it.
  • toolkit/. The shared layer: f1data loads OpenF1 sessions, laps, stints and telemetry; history loads Jolpica results, qualifying, laps and pit stops; metrics holds the agreed definitions (clean laps, fuel correction, degradation, pit loss); telemetry slices and aligns laps; plots sets the chart style. Chapters never quietly redefine a metric; if a chapter needs a variant, it says so. toolkit/README.md documents the API, and Appendix B lists every table and column.
  • project/boxbox/. Box Box, the race-strategy simulator built across the book. Each chapter adds exactly one module and demonstrates it in its project_checkpoint.py. Meet Sector Four has the full module map, and Chapter 40 assembles it into a command-line tool.

Setting up, in brief

You need Python 3.11 or later and the standard scientific stack: pandas, NumPy, SciPy, statsmodels, scikit-learn, Matplotlib, seaborn, Plotly and PyArrow. From the book's root folder:

pip install -r requirements.txt     # the scientific stack (FastF1 is listed as optional)
python -m pytest toolkit/tests -q   # the toolkit's tests, run against the processed data

Then try a first script:

cd part-01-physics/chapter-01-what-makes-an-f1-car-fast
python code/01_first_speed_trace.py

Chapter 2 covers the full setup: where the data come from, how the raw downloads become the processed tables, and the cleaning decisions along the way. If you are new to Python or pandas, read Appendix A alongside Chapters 1 and 2.

The appendices

The appendices are reference material, meant to be kept open while you work:

A few habits that will serve you well

  • Read the definition before the number. "Degradation", "pit loss" and "overtake" each have several reasonable definitions, and they give different answers. The 📐 boxes tell you which one a number uses.
  • Check the sample size. A rate from four races is a story, not a statistic. The book gives n and an interval; get into the habit of looking for both.
  • Run the code before you trust the chart. That is the whole point of a reproducible book.