load_driver_telemetry {f1dataR} | R Documentation |
Load Telemetry Data for a Driver
Description
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')
).
Usage
load_driver_telemetry(
season = get_current_season(),
round = 1,
session = "R",
driver,
laps = "fastest",
log_level = "WARNING",
race = lifecycle::deprecated(),
fastest_only = lifecycle::deprecated()
)
Arguments
season |
number from 2018 to current season (defaults to current season). |
round |
number from 1 to 23 (depending on season selected). Also accepts race name. |
session |
the code for the session to load Options are |
driver |
three letter driver code (see |
laps |
which lap's telemetry to return. One of an integer lap number (<= total laps in the race), |
log_level |
Detail of logging from fastf1 to be displayed. Choice of:
|
race |
|
fastest_only |
|
Value
A tibble with telemetry data for selected driver/session.
Examples
if (interactive()) {
telem <- load_driver_telemetry(
season = 2023,
round = "Bahrain",
session = "Q",
driver = "HAM",
laps = "fastest"
)
}