https://github.com/Casper-Guo/Armchair-Strategist
Strategy dashboard for all F1 races since 2018
https://github.com/Casper-Guo/Armchair-Strategist
data-visualization f1 formula1 python
Last synced: about 3 hours ago
JSON representation
Strategy dashboard for all F1 races since 2018
- Host: GitHub
- URL: https://github.com/Casper-Guo/Armchair-Strategist
- Owner: Casper-Guo
- License: apache-2.0
- Created: 2022-08-06T19:26:05.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2026-05-25T00:01:17.000Z (about 1 month ago)
- Last Synced: 2026-05-25T02:12:26.501Z (about 1 month ago)
- Topics: data-visualization, f1, formula1, python
- Language: Python
- Homepage: https://armchair-strategist.dev/
- Size: 372 MB
- Stars: 88
- Watchers: 4
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-f1 - Armchair Strategist - Strategy-focused F1 dashboard for pit windows, pace comparison, and race narrative visualization. (Formula 1 / Dashboards and Analytics)
README
# Armchair Strategist
[](https://github.com/astral-sh/ruff)
This repository contains all the code for the [armchair strategist dashboard](www.armchair-strategist.dev) as well as engineered data for F1 races from the 2018 season onwards.
The visualizations in this README are automatically updated to reflect the latest race.
## Visualizations of the Most Recent Race
Pit Stop Strategies
Function call:
strategy_barplot(season, event, session_type)
Position Changes
Function call:
driver_stats_scatterplot(season, event, session_type)
Point Finishers Race Pace
Function call:
strategy_barplot(season, event, session_type, drivers=10)
Fuel-adjusted lap times
Function call:
driver_stats_scatterplot(season, event, session_type, drivers=10, y="FuelAdjLapTime")
Podium Finishers Gap to Winner
Function call:
add_gap(winner, modify_global=True, season, session_type)
driver_stats_lineplot(season, event, session_type, drivers=3, y="GapTo{winner}")
Race Trace to Winner Average Pace
Function call:
add_gap(winner, modify_global=True, distribute_pit_loss=True, season, session_type)
driver_stats_lineplot(season, event, session_type, drivers=3, y="GapTo{winner}Pace")
Teammate Pace Comparisons
Boxplot visualization:
Function call:
driver_stats_distplot(season, event, session_type, violin=False, swarm=False, teammate_comp=True)
Violinplot with all laptimes:
Function call:
driver_stats_distplot(season, event, session_type, teammate_comp=True)
Driver Pace Comparison
Function call:
driver_stats_distplot(season, event, session_type)
Team Pace Ranking
Function call:
See readme_machine.py
## Build
Build with `pip install -e .` Using a Python virtual environment is highly recommended.
## [Dashboard](www.armchair-strategist.dev)
Run dashboard locally with `python3 app.py`. Debug mode can be enabled by setting `app.run(debug=True)` in `app.py`.
## Contributing
You should install pre-commit hooks with `pre-commit install`.
## Data Source
All data sourced from the [FastF1](https://github.com/theOehrly/Fast-F1) package.
## Data Availability
Data from all grand prixs and sprint races beginning in the 2018 season, excluding test sessions, are available. This repository will be automatically updated during the F1 season.
## Metrics Definitions
See `SCHEMA.md` for details on the columns provided in `Data/all_laps_*.csv` and `Data/transformed_laps_*.csv` files.
## Additional Examples
Tyre Degradation Lineplot
Function call:
compounds_lineplot(seasons, events)
Tyre Degradation Distribution Plot
Function call:
compounds_distplot(seasons, events)