plot_fastest | R Documentation |
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()
)
season |
number from 2018 to current season (defaults to current season). |
round |
number from 1 to 23 (depending on season selected) and defaults to most recent. |
session |
the code for the session to load Options are |
driver |
three letter driver code (see load_drivers() for a list) or name to be fuzzy matched to a driver from the session if FastF1 >= 3.4.0 is available. |
color |
argument that indicates which variable to plot along the
circuit. Choice of |
race |
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")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.