add_storm_track: Plot Atlantic basin hurricane tracks

Description Usage Arguments Value Examples

View source: R/map_winds.R

Description

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

Usage

1
2
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
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)

## End(Not run)

geanders/stormwindmodel documentation built on Oct. 15, 2018, 12:06 p.m.