FastF1 is a python package for accessing and analyzing Formula 1 results, schedules, timing data and telemetry
MIT License
Added support for Numpy v2.0.
Completely reimplemented the fastf1.plotting
module. The new module
provides a more flexible and powerful API for creating custom plots. This
is an overview of the relevant new features and changes:
Driver and team names, abbreviations and colors are now supported for
all seasons since 2018 instead of only for the most recent season.
Driver changes and test drivers running in free practice session are now
supported automatically and do no longer require an update of FastF1.
Users can now choose between the "offcial" F1 color map and the color map
that was already used previously by FastF1.
Driver specific colors are deprecated. Users are encouraged to use more
visually distinct plot styling options instead to differentiate between
drivers of the same team. The new
fastf1.plotting.get_driver_style
function can be used to easily
get driver specific styling options.
Users can override team colors and short name constants on a per-session
basis.
The API has been improved to be more consistent and easier to use.
Added support for a fallback mirror for the F1 livetiming API. If the primary
API is unavailable, FastF1 will automatically switch to the fallback mirror
and continue to work without any user intervention.
This feature is experimental and for now provided without any guarantees.
Added a warning that informs users when event, driver or team names are
fuzzy matched. (by @Casper-Guo) (#574)
Improved fuzzy matching of event names to give better matching results. (by
@Casper-Guo) (#579)
The SignalRClient can now be started when an async event loop is already
running by awaiting the new
fastf1.livetiming.client.SignalRClient.async_start
coroutine. This
enables usage in newer versions of Juypter Notebooks, for example.
Set a default connection timeout of five seconds for all requests to the
Ergast API. This should prevent long data loading times when the API is
unresponsive.
Drivers that crashed on the very first lap are now assigned NaN
as their
position, ensuring correct positions throughout the field at then end of the
first lap. (by @AND2797) (#595)
Fixed a bug that prevented loading of any data when driver information was
unavailable from the F1 livetiming API.
Fixed a bug in the client side rate limiting that allowed higher rates than
intended. This may have caused the client to be temporarily blocked by the
server.
The following module level properties of :mod:fastf1.plotting
have been
deprecated:
fastf1.plotting.COMPOUND_COLORS
,
fastf1.plotting.DRIVER_COLORS
,
fastf1.plotting.DRIVER_TRANSLATE
,
fastf1.plotting.TEAM_COLORS
,
fastf1.plotting.TEAM_TRANSLATE
,
fastf1.plotting.COLOR_PALETTE
The following functions in :mod:fastf1.plotting
have been deprecated:
fastf1.plotting.driver_color
,
fastf1.plotting.team_color
,
fastf1.plotting.lapnumber_axis
The argument misc_mpl_mods
of function fastf1.plotting.setup_mpl
is deprecated and will be removed in the future without replacement for its
functionality.
The argument color_scheme
of function fastf1.plotting.setup_mpl
will default to None
in the future, meaning that FastF1's default color
scheme will need to be enabled explicitly.
The new minimum version of Python is 3.9. Support for Python 3.8 is dropped.
The minimum versions for the following dependencies have been increased:
Published by theOehrly 4 months ago
Second alpha pre-release for reimplemented plotting submodule.
Discussion in https://github.com/theOehrly/Fast-F1/pull/585
Published by theOehrly 4 months ago
Published by theOehrly 4 months ago
Published by theOehrly 5 months ago
Published by theOehrly 5 months ago
Laps where a driver crashes and retires on track now contain a correct
track status (fixes #575)
Fixed previously incorrect circuit info for Mugello 2020 (fixes #563)
Published by theOehrly 5 months ago
Alpha pre-release for reimplemented plotting submodule.
Discussion in #585
Published by theOehrly 6 months ago
Fixed an issue that causes no result data to be available for 'Sprint Qualifying' sessions
Correctly handle reinstated lap times after they were previously deleted
Published by theOehrly 6 months ago
Published by theOehrly 7 months ago
Published by theOehrly 7 months ago
Laps
DataFrame (fixes #557 and more).Published by theOehrly 8 months ago
Fix: correctly handle empty strings when parsing them in fastf1.utils.to_datetime
(by @erdieee) (#531)
Fix: gracefully handle empty strings when parsing datetime values in Ergast responses (by @mdsakalu) (#546). This fixes partially missing data in the results Qualifying and Race results for the 2024 Saudi Arabia GP.
Published by theOehrly 8 months ago
Updated team names and team colors for the 2024 season. (As usual, this means
that this information is no longer valid for the previous season! see note below)
Improved the accuracy of fastf1.utils.delta_time
(by @grahamjwhite)
(#512)
Note: The update of the team names and team colors for the 2024 season means that you may no longer be able to visualize data from 2023 correctly. This is a long-standing issue that will most likely be resolved with the next minor release in a few months.
Published by theOehrly 9 months ago
fastf1.core.Session.get_circuit_info
Published by theOehrly 9 months ago
Published by theOehrly 10 months ago
Added support for Pandas version v2.1.0 and higher.
Methods fastf1.core.Lap.get_telemetry
and
fastf1.core.Laps.get_telemetry
now take an optional additional
frequency
keyword argument to override the default frequency that is
used for resampling.
Added fastf1.core.Laps.pick_box_laps
to select inlaps and outlaps
(#454) (by @pesaventofilippo)
Added the lap number to race control messages, see
fastf1.core.Session.race_control_messages
(#475) (by @manpean)
Improved lap data integrity checks (#449) (by @d-tomasino)
Added a string representation for the Cache class that gives information
about the cache path and the cache size
Added the function fastf1.Cache.get_cache_info
that returns
information about the cache path and the cache size
Fixed incorrect lap number (zero instead of one) for generated laps that are
added when a driver crashes on the very first lap
Fixed fastf1.core.Session.get_circuit_info
fails if the default
resampling frequency for telemetry data is changed (#455)
Fixed multiple issues with the Ergast API interface that resulted in
invalid request being made and consequentially no data being returned
(#489, #494) (by @Lombardoc4)
Fixed missing driver information for drivers that did not start in a race
(classified as DNS - did not start) (#447)
Fixed a regression introduced in v3.1.3 that caused the CountryCode
to be missing from fastf1.core.SessionResults
Fixed a compatibility issued with Pandas v1.3.5
Published by theOehrly 11 months ago
Published by theOehrly 11 months ago
Fixed a bug that caused inconsistent behaviour in
fastf1.core.Laps.pick_fastest
in some cases were there was no lap
that met the criteria for a fastest lap. Now, an empty
fastf1.core.Lap
object will always be returned when there is no
fastest lap. (Note that this will change in the future, see 'Deprecations'
below (#476) (by @Casper-Guo)
Fixed a bug that prevented some sessions of the Las Vegas Grand Prix from
being loaded (#481)
Published by theOehrly 12 months ago
Fixed a bug that caused fastf1.core.Telemetry.add_driver_ahead
to
only work with telemetry data that matches the sampling timebase of the
car data (#430)
Improved robustness of the Ergast API parser to prevent crashes caused by some
empty values in the API response (#433) (by @harningle)
Fixed: some laps that were generated by FastF1 had incorrect lap numbers
Fixed: pit out times from the lap onto the grid are no longer shown for the
first lap of a race-like session. The first lap will only have a pit out time
if a driver started from the pit lane or pitted on the formation lap.
(#467) (by @Casper-Guo)
Improved robustness of the 'f1timing' schedule backend to prevent a crash
caused by partially incorrect data for the schedule of the Qatar GP
Fixed: laps for all drivers were marked as inaccurate if the lap accuracy
check could not be performed for one driver
Published by theOehrly about 1 year ago