Skip to content

davidharrigan/formula-crunch

Repository files navigation

formula-crunch

formula-crunch is an experiment with the FastF1 Python API to analyze Formula1 driver performance during a race.

The manage.py Python script can scrape race data, perform analysis, and store the result in a SQLite database. Next.js uses the SQLite database to generate interesting graphics as static pages, so the results can be made available as a website without any data storage dependency (although the generated graphics are sized to be suitable for sharing on social media sites).

See an example here.

Scrape data

Scrape driver data

python manage.py scrape drivers

Scrape circuit data

python manage.py scrape circuites

Scrape race data

python manage.py scrape race --event=<country or circuit name>

For more usage info, use the --help flag with any sub-command

python manage.py scrape --help

Database Migration

Generate migration from model changes

alembic revision --autogenerate -m "added something new"

Run migration

alembic upgrade head

Rollback to previous version

alembic downgrade head-1

Generating UI

Run the UI server

npm run dev

Releases

No releases published

Packages