Part of the Physics family.
Lineage
Overview
16 tests guard this model - 11 generic, 5 singular.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Foundation for all downstream window functions.
| Property | Value |
|---|---|
| Layer | intermediate |
| Family | Physics |
| Contract enforced | No |
| Upstream | stg_laps, stg_tyre_allocations |
| Column | Type | Nullable | Tests | Description |
|---|---|---|---|---|
stint_id | Yes | not_null | Surrogate key combining race_year, race_id, driver_id, stint_number | |
lap_id | Yes | not_null, unique | Foreign key to stg_laps | |
lap_in_stint | Yes | not_null | Chronological ordinal within the stint (1, 2, 3, …), counting every lap including SC/VSC/pit/invalid ones. | |
valid_lap_in_stint | Yes | Ordinal among valid laps only within the stint (NULL on invalid laps). Use for pace-fitting position/length logic instead of lap_in_stint. | ||
stint_length_actual | Yes | not_null | Total lap count in the stint (valid + invalid). | |
stint_length_valid | Yes | Count of valid laps in the stint. | ||
is_valid_lap | Yes | not_null | Carried through from stg_laps. Timed, on-track, not deleted, accurate, not lap 1, no SC/VSC. | |
is_pit_lap | Yes | not_null | Carried through from stg_laps. TRUE for the out-lap/in-lap of a pit stop. | |
is_safety_car_lap | Yes | not_null | Carried through from stg_laps. TRUE when the TrackStatus string contains a 4 (full SC). | |
is_vsc_lap | Yes | not_null | Carried through from stg_laps. TRUE when the TrackStatus string contains a 6 or 7 (VSC). | |
is_red_flag_lap | Yes | not_null | Carried through from stg_laps. TRUE when the TrackStatus string contains a 5 (red flag). | |
age_in_stint | Yes | expect_column_values_to_be_between | Tyre age in laps at this lap. Directly from FastF1 TyreLife (no imputation, no reconstruction). 343 rows (0.21%) carry NULL: 325 of them (94.8%) sit on lap 1 of a stint, where tyre-life occasionally arrives without a reading. This is a pattern, not random scatter, and occurs at the exact position where starting_tyre_age_laps is derived. For stints opening on lap 1: if age_in_stint is NULL at the stint start and you need a starting age, the column is missing; do not assume the tyre is fresh (a used/scrubbed set starting a stint will have age_in_stint > 1 or NULL, but never 0). Consumers should carry this column forward or declare how NULLs are handled. | |
compound_code | Yes | Tyre compound code (C1–C5) assigned by Pirelli for this race, joined from stg_tyre_allocations on (race_year, circuit_key, compound_label). Absolute identifier, unlike compound_in_stint which is relative. Enables cross-circuit compound comparison and physical-parameters lookup in dim_compounds_season. PROVISOS: (1) Data starts at 2019-01-20 (first Pirelli 2019 season race). 2018 rows carry NULL by construction — Pirelli’s relative naming began in 2019, and 08d’s sourcing covers 2019-2024 only. (2) Sourced from user verification (2026-09-17) of a 128-row Pirelli allocation table covering 127 mart races 2019–2024 (100% join coverage). Sourcing caveat: only 47 of 128 source URLs resolve; see _improvements/work/08-foundations-repair.md (08d) for the full provenance and epistemics ruling. | ||
compound_label | Yes | Tyre compound label (hard, medium, soft) assigned by Pirelli for this race. Relative to the circuit - Pirelli picks 3 compounds per weekend and calls them hard/medium/soft, so “soft” at one circuit is not the same rubber as “soft” at another. The compound_code is the absolute identifier; this label is the relative one. | ||
race_year | Yes | Season year. | ||
race_id | Yes | Race identifier. | ||
driver_id | Yes | FastF1 three-letter driver code (e.g. VER, HAM). |