Description Usage Arguments Examples
Map counties as "exposed" or "unexposed" based on the criteria that the
storm came within a given distance (specified by dist_limit
) of
the county's population mean center and a certain amount of rain
rain_limit
fell during a specified window of days (days_included
).
1 2 3 4 5 6 7 | map_rain_exposure(
storm,
rain_limit,
dist_limit,
days_included = c(-2, -1, 0, 1),
add_track = TRUE
)
|
storm |
Character string giving the name of the storm to plot (e.g., "Floyd-1999") |
rain_limit |
Minimum of rainfall, in millimeters, summed across the days
selected to be included ( |
dist_limit |
Maximum distance, in kilometers, of how close the storm track must come to the county's population mean center to classify the county as "exposed" to the storm. |
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. |
1 2 3 4 5 6 7 8 9 10 11 12 13 | # 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_rain_exposure(storm = "Floyd-1999", rain_limit = 50, dist_limit = 100)
# Example of customizine track appearance
allison_map <- map_rain_exposure(storm = "Allison-2001", rain_limit = 125,
dist_limit = 100, days_included = -5:3,
add_track = FALSE)
map_tracks("Allison-2001", plot_object = allison_map, plot_points = TRUE)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.