Description Usage Arguments Value Examples
Map counties
1 2 3 4 5 6 7 8  | map_counties(
  storm,
  metric = "distance",
  wind_var = "vmax_sust",
  days_included = c(-2, -1, 0, 1),
  add_track = TRUE,
  wind_source = "modeled"
)
 | 
storm | 
 Character string giving the name of the storm to plot (e.g., "Floyd-1999")  | 
metric | 
 Character string giving the metric to plot. Current options are
  | 
wind_var | 
 A character string giving the wind variable to use. Choices
are   | 
days_included | 
 A numeric vector listing the days to include when
calculating total precipitation. Negative numbers are days before the
closest date of the storm to a county. For example,
  | 
add_track | 
 TRUE / FALSE of whether to add the storm's track to the map. The default is TRUE.  | 
wind_source | 
 A character string specifying the source to use for the winds. Options
are   | 
This function creates a choropleth map of counties in the eastern part of the United States, showing distance from a storm track, maximum wind speed (or duration of winds at or above 20 m / s), or total rainfall over a given window of one or more days near the date of the storm's closest approach.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  | # Ensure that data package is available before running the example.
#  If it is not, see the `hurricaneexposure` package vignette for details
# on installing the required data package.
if (requireNamespace("hurricaneexposuredata", quietly = TRUE)) {
map_counties("Floyd-1999", metric = "rainfall", days_included = c(-2, -1, 0, 1))
map_counties("Katrina-2005", metric = "wind")
map_counties("Katrina-2005", metric = "wind", wind_var = "vmax_gust")
map_counties("Katrina-2005", metric = "wind", wind_var = "sust_dur")
map_counties("Katrina-2005", metric = "wind", wind_source = "ext_tracks")
#' map_counties("Michael-2018", metric = "wind")
map_counties("Michael-2018", metric = "wind", wind_var = "vmax_gust")
map_counties("Michael-2018", metric = "wind", wind_source = "ext_tracks")
}
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.