FastF1¶
For the passionate F1 nerds.
Introduction¶
FastF1 gives you access to F1 lap timing, car telemetry and position, tyre data, weather data, the event schedule and session results.
Main features:
Access to F1 timing data, telemetry, sessions results and more
Full support for Ergast to access current and historical F1 data
All data is provided in the form of extended Pandas DataFrames to make working with the data easy while having powerful tools available
Adds custom functions to the Pandas objects specifically to make working with F1 data quick and simple
Integration with Matplotlib to facilitate data visualization
Implements caching for all API requests to speed up your scripts
To get a quick overview over how to use FastF1, check out Getting Started or the Examples Gallery.
Note that FastF1 handles big chunks of data (~50-100mb per session). To improve
performance, data is per default cached locally. The default placement
of the cache is operating system specific. A custom location can be set if
desired. For more information see Cache
.
Have fun!
Installation¶
It is recommended to install FastF1 using pip:
pip install fastf1
Note that Python 3.8 or higher is required.
Alternatively, a wheel or a source distribution can be downloaded from Pypi.
You can also install using conda:
conda install -c conda-forge fastf1
Third-party packages¶
R package that wraps FastF1: https://cran.r-project.org/package=f1dataR
These packages are not directly related to the FastF1 project. Questions and suggestions regarding these packages need to be directed at their respective maintainers.
Supporting the Project¶
If you want to support the continuous development of FastF1, you can sponsor me on GitHub or buy me a coffee.
Available Data¶
The following is a short overview over the available data with some references to functions and objects used to work with this data.
In most cases, the default workflow with FastF1 is to create a
Session
object using get_session()
. You,
will then access all data through the session object. One notable exception to
this pattern is the wrapper for Ergast.
Topic |
Data |
References |
---|---|---|
Event Schedule |
event names, countries, locations, dates, scheduled starting times,… (previous and current season including upcoming events) |
|
Results |
driver names, team names, finishing and grid positions, points, finishing status,… |
|
Timing Data |
sector times, lap times, pit stops, tyre data and much more |
|
Track Status |
flags, safety car |
|
Session Status |
started, finished, finalized |
|
Race Control Messages |
investigations, penalties, restart announcements,… |
|
Telemetry |
speed, rpm, gear, normalized track position, … |
|
Track Markers |
corner numbers, marshall sectors, marshall lights |
|
Ergast API |
all endpoints that are provided by Ergast |
Compatibility and Availability¶
Timing data, session information, car telemetry and position data are available from 2018 onwards. (This data is usually available within 30-120 minutes after the end of a session.) It is also possible to obtain this data by recording the data live stream, using the live timing recorder that is built into FastF1. Usually this is not necessary but there have been server issues in the past which caused the data to be not available for download. Recording of the data live stream is therefore mostly a solution for redundancy.
Schedule information and session results are available for older seasons as well, going back as far as 1950 (limited to data that is available through Ergast).
Contents¶
- Getting Started
- Examples Gallery
- General Functions -
fastf1
- Timing and Telemetry Data -
fastf1.core
- API Reference
- Event Schedule -
fastf1.events
- F1 API -
fastf1.api
- Ergast API Interface
- Circuit Information
- Utils module -
fastf1.utils
- Plotting -
fastf1.plotting
- Live Timing Client -
fastf1.livetiming
- Logging -
fastf1.logger
- Legacy Functionality -
fastf1.legacy
Questions, Contacting the Maintainer and Code of Conduct¶
For questions that may be of interest to the whole community, please use the Github Discussions section to ask for help. This includes general support questions.
In case of questions that you prefer to discuss privately, feel free to contact me via email at oehrly@mailbox.org. Any requests to this address will be treated with confidentiality, if desired. Do not use this email address for general support requests! Such requests will likely be ignored.
FastF1 has a Code of Conduct. Complaints about a perceived breach of this code of conduct should be sent to oehrly@mailbox.org, in almost all cases. Please refer to the Code of Conduct, available through the main page of the GitHub repository (or click here), for information on how breaches are reported, how the Code of Conduct is enforced and what values FastF1 encourages.
Indices and tables¶
Notice¶
FastF1 and this website are unofficial and are not associated in any way with the Formula 1 companies. F1, FORMULA ONE, FORMULA 1, FIA FORMULA ONE WORLD CHAMPIONSHIP, GRAND PRIX and related marks are trade marks of Formula One Licensing B.V.