Creates a ggplot graphic that details the fastest lap for a driver in a race. Complete with a gearshift or speed analysis.
plot_fastest(
season = get_current_season(),
round = 1,
session = "R",
driver,
color = "gear",
race = lifecycle::deprecated()
)
number from 2018 to current season (defaults to current season).
number from 1 to 23 (depending on season selected) and defaults to most recent.
the code for the session to load Options are 'FP1'
, 'FP2'
, 'FP3'
,
'Q'
, 'S'
, 'SS'
, and 'R'
. Default is 'R'
, which refers to Race.
three letter driver code (see load_drivers() for a list).
argument that indicates which variable to plot along the
circuit. Choice of 'gear'
or 'speed'
, default 'gear'
.
number from 1 to 23 (depending on season selected) and defaults to most recent.
A ggplot object that indicates grand prix, driver, time and selected color variable.
# Plot Verstappen's fastest lap (speed) from Bahrain 2023:
if (interactive()) {
plot_fastest(2023, 1, "R", "VER", "speed")
}