Description Usage Arguments Value Note Examples
View source: R/event_exposure.R
Takes a list of US counties, based on their 5-digit Federal Information Processing
Standard (FIPS) codes, boundaries on the range of years to be considered, and
the type of event (e.g., "flood", "tornado") and returns a list of all storms with
listings for that type of event for the counties. This output is based on listings in
the NOAA Storm Events database. See the help documentation for the storm_events
dataset for more information and references on the data source used by this function.
1 | county_events(counties, start_year, end_year, event_type)
|
counties |
Character vector of the five-digit Federal Information Processing Standard (FIPS) codes for counties for which the user wants to determine storm exposure. |
start_year |
Four-digit integer with first year to consider. |
end_year |
Four-digit integer with last year to consider. |
event_type |
Character string with the type of event to use to identify
county exposures. Options include |
Returns a dataframe with a row for each county-storm pair and with columns for:
fips
: County's 5-digit Federal Information Processing Standard
(FIPS) code
storm_id
: Unique storm identifier with the storm name and year,
separated by a hyphen (e.g., "Alberto-1988",
"Katrina-2005")
usa_atcf_id
: United States Automated Tropical Cyclone Forecasting
storm identifier
closest_time_utc
: Time, in UTC, of the closest approach of the
storm to the county's population mean center,
based on storm tracks linearly interpolated to
15-minute increments.
storm_dist
: Minimum distance (in kilometers) between the storm's
track and the county's population mean center.
local_time
: Local time of the closest approach of the storm to the
county's population mean center, based on storm tracks
linearly interpolated to 15-minute increments.
closest_date
: Date (based on local time) of the closest
approach of the storm to the county's population
mean center.
Of the event types that this function can pull, only "tornado" and "wind" are available for years before 1996. Therefore, this function will pull listed tornado events or wind events for all years, but for any other event type, you should not use a start year prior to 1996, as events of other types were not recorded in the database before 1996.
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)) {
county_events(counties = c("37031", "37053", "37055"),
start_year = 1996, end_year = 2018,
event_type = "flood")
county_events(counties = c("37055"),
start_year = 1996, end_year = 2018,
event_type = "tropical_storm")
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.