Skip to content

NimishKatara/Armchair-Strategist

 
 

Repository files navigation

Armchair Strategist

Ruff

This repository contains all the code for the armchair strategist dashboard as well as engineered data for F1 races from the 2018 season onwards.

The dashboard and visualizations in this README are updated every Monday at midnight to reflect the latest race.

Visualizations of the Most Recent Race

Pit Stop Strategies strategy
Function call: strategy_barplot(season, event)
Position Changes position
Function call: driver_stats_scatterplot(season, event, drivers=10)
Point Finishers Race Pace laptime
Function call: strategy_barplot(season, event)
Podium Finishers Gap to Winner
Function call: See f1_visualization/readme_machine.py
Teammate Pace Comparisons Boxplot visualization:
Function call: driver_stats_distplot(season, event, violin=False, swarm=False, teammate_comp=True, drivers=20)
Violinplot with all laptimes:
Function call: driver_stats_distplot(season, event, violin=False, swarm=False, teammate_comp=True, drivers=20)
Team Pace Comparisons
Function call: See f1_visualization/readme_machine.py

Build

Build with pip install -e . Using a Python virtual environment is highly recommended.

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 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)

About

Strategy dashboard for all F1 races since 2018

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.9%
  • Shell 3.1%