add_storm_track: Plot Atlantic basin hurricane tracks

View source: R/map_winds.R

add_storm_trackR Documentation

Plot Atlantic basin hurricane tracks

Description

Plot the tracks of a selected tropical storm to a map of modeled wind speed.

Usage

add_storm_track(
  storm_tracks,
  plot_object,
  plot_points = FALSE,
  alpha = 1,
  color = "firebrick"
)

Arguments

storm_tracks

A data frame with best tracks data for the storm track you would like to add. See the example floyd_tracks data for an example of the required format. This dataset must include columns for date (date-time of the track observation), latitude, and longitude.

plot_object

NULL or the name of a ggplot object to use as the underlying plot object (e.g., the output from a call to map_wind)

plot_points

TRUE / FALSE indicator of whether to include points, as well as lines, when plotting the hurricane tracks.

alpha

Numerical value designating the amount of transparency to use for plotting tracks.

color

Character string giving the color to use to plot the tracks.

Value

A ggplot object that includes a line with the track of a given tropical storm. This object can be printed directly or added on to with other ggplot commands.

Examples

library(ggplot2)
data("county_points")
data("floyd_tracks")
grid_winds_floyd <- get_grid_winds(hurr_track = floyd_tracks,
                                   grid_df = county_points)
floyd_map <- map_wind(grid_winds_floyd, value = "vmax_sust",
                      wind_metric = "knots") +
             ggtitle("Maximum sustained wind speeds")
add_storm_track(floyd_tracks, plot_object = floyd_map)



geanders/stormwindmodel documentation built on Sept. 27, 2022, 6:47 a.m.