
Last chance! 50% off unlimited learning
Sale ends in
Receives season, race number, driver code, and an optional fastest lap only
argument to output car telemetry for the selected situation.
Example usage of this code can be seen in the Introduction vignette (run
vignette('introduction', 'f1dataR')
to read). Multiple drivers' telemetry can be appended
to one data frame by the user.
If you have trouble with errors mentioning 'fastf1' or 'get_fastf1_version()' read the
"Setup FastF1 Connection" vignette (run vignette('setup_fastf1', 'f1dataR')
).
load_driver_telemetry(
season = get_current_season(),
round = 1,
session = "R",
driver,
laps = "fastest",
log_level = "WARNING",
race = lifecycle::deprecated(),
fastest_only = lifecycle::deprecated()
)
A tibble with telemetry data for selected driver/session.
number from 2018 to current season (defaults to current season).
number from 1 to 23 (depending on season selected). Also accepts race name.
the code for the session to load Options are 'FP1'
, 'FP2'
, 'FP3'
,
'Q'
, 'S'
, 'SS'
, 'SQ'
, and 'R'
. Default is 'R'
, which refers to Race.
three letter driver code (see load_drivers()
for a list)
which lap's telemetry to return. One of an integer lap number (<= total laps in the race), fastest
,
or all
. Note that integer lap choice requires fastf1
version 3.0 or greater.
Detail of logging from fastf1 to be displayed. Choice of:
'DEBUG'
, 'INFO'
, 'WARNING'
, 'ERROR'
and 'CRITICAL'
. See fastf1 documentation.
fastest_only
is no longer supported, indicated preferred
laps in laps
.
if (interactive()) {
telem <- load_driver_telemetry(
season = 2023,
round = "Bahrain",
session = "Q",
driver = "HAM",
laps = "fastest"
)
}
Run the code above in your browser using DataLab