mchmiel21/turning_density_f1 — explained in plain English
Analysis updated 2026-05-18
Rank F1 circuits by how twisty or straight they are for a given season.
Compare how a track's turning profile changes across multiple years.
Generate visual charts and circuit maps colored by speed or cornering force.
| mchmiel21/turning_density_f1 | 0xustaz/streamgate | a-bissell/unleash-lite | |
|---|---|---|---|
| Stars | 1 | 1 | 1 |
| Language | Python | Python | Python |
| Setup difficulty | easy | hard | hard |
| Complexity | 2/5 | 4/5 | 4/5 |
| Audience | data | developer | researcher |
Figures from each repo's GitHub metadata at analysis time.
Just needs Python and a few pip-installable data libraries, no external services.
This project analyzes how twisty or straight Formula 1 race tracks are, using real telemetry data from qualifying sessions. It introduces two custom metrics: Turning Density, which measures how much a car's direction changes over the length of a lap, and Lateral G Weighted Turning Density, which adjusts that number based on how much sideways force the car experiences in each turn. A track with a higher score is more twisty and demanding, while a lower score means a straighter, faster circuit. The code is split into two main scripts. One script, compute_TD_and_LGWTD.py, pulls telemetry from every valid qualifying lap for a chosen F1 season and calculates both metrics for each circuit. The only thing a user needs to set is the year they want to analyze. The second script, make_plots.py, takes that computed data and turns it into charts and images, including bar charts ranking circuits, side by side comparisons across different years at the same track, and grid layouts of circuit maps colored by speed or lateral force. The project produces both raw data files, such as CSV and Parquet files with the computed rankings and coordinate traces, and visual outputs like the bar charts and circuit maps described above. It relies on the open source Fast F1 Python package to get the underlying telemetry, and borrows some calculation logic from another public project for estimating lateral forces. The author is upfront about the limits of this approach. Because Fast F1 provides normalized track positions rather than true GPS coordinates, and because it lacks banking angle data, the lateral force numbers can be somewhat overestimated on banked corners. The metrics also shift from year to year as cars and regulations change, so they are best used for relative comparisons rather than as exact physical measurements. To run it, you need Python along with a handful of common data science libraries: fastf1, numpy, pandas, pyarrow, matplotlib, and seaborn. This is an independent, unofficial fan project and is not affiliated with Formula 1 or its associated trademarks.
A Python tool that measures how twisty or straight F1 race tracks are, using real qualifying telemetry data.
Mainly Python. The stack also includes Python, fastf1, pandas.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly data.
This repo across BitVibe Labs
Verify against the repo before relying on details.