multi_county_rain: Hurricane exposure by rain for communities

Description Usage Arguments Value References Examples

View source: R/rain_exposure.R

Description

This function takes a dataframe with multi-county communities (see example for the proper format) and returns a community-level dataframe of storms to which the community was exposed, based on the average distance between the storm's track and the population-based centers of each county in the community and the given threshold of rainfall, summed over the days included in the rainfall measurement.

Usage

1
2
3
4
5
6
7
8
multi_county_rain(
  communities,
  start_year,
  end_year,
  rain_limit,
  dist_limit,
  days_included = c(-2, -1, 0, 1)
)

Arguments

communities

A dataframe with the FIPS codes for all counties within each community. It must include columns with a column identifier (commun) and with the FIPS codes of counties included in each community (fips). See the example code.

start_year

Four-digit integer with first year to consider.

end_year

Four-digit integer with last year to consider.

rain_limit

Minimum of rainfall, in millimeters, summed across the days selected to be included (days_included), that must fall in a county for the county to be classified as "exposed" to the storm.

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, c(-1, 0, 1) would calculate rain for a county as the sum of the rainfall for the day before, the day of, and the day after the date when the storm center was closest to the county center. Values can range from -5 to 3 (i.e., at most, you can calculate the total rainfall from five days to three days after the day when the storm is closest to the county).

Value

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

References

Al-Hamdan MZ, Crosson WL, Economou SA, Estes MG, Estes SM, Hemmings SN, Kent ST, Puckette M, Quattrochi DA, Rickman DL, Wade GM, McClure LA, 2014. Environmental public health applications using remotely sensed data. Geocarto International 29(1):85-98.

North America Land Data Assimilation System (NLDAS) Daily Precipitation years 1979-2011 on CDC WONDER Online Database, released 2012. http://wonder.cdc.gov/wonder/help/Precipitation.html

Rui H, Mocko D, 2014. README Document for North America Land Data Assimilation System Phase 2 (NLDAS-2) Products. Goddard Earth Sciences Data and Information Services Center.

Examples

 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)) {

communities <- data.frame(community_name = c(rep("ny", 6), "no", "new"),
                         fips = c("36005", "36047", "36061",
                                  "36085", "36081", "36119",
                                  "22071", "51700"))
rain_storm_df <- multi_county_rain(communities = communities,
                                   start_year = 1995, end_year = 2005,
                                   rain_limit = 100, dist_limit = 100)
}

geanders/hurricaneexposure documentation built on Feb. 16, 2020, 8:19 a.m.