county_events {hurricaneexposure}R Documentation

Find events for storms by county

Description

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.

Usage

county_events(counties, start_year, end_year, event_type)

Arguments

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 "flood", "tornado", "wind", and "tropical_storm".

Value

Returns a dataframe with a row for each county-storm pair and with columns for:

Note

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.

Examples

# 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")
}

[Package hurricaneexposure version 0.1.1 Index]