find_q2: Get median flood for each gage

Description Usage Arguments Value See Also Examples

View source: R/flood_val.R

Description

This function will get annual maximum flow series for each USGS gage and compute median flood (Q2) to serve as flood threshold. Peak flow data is obtained using the readNWISpeak function from the dataRetrieval package.

Usage

1
find_q2(site_no)

Arguments

site_no

Character vector with USGS gage IDs of stream gage sites to pull.

Value

A data frame with median flood values (Q2) and the number of years of data used to compute this value.

See Also

readNWISpeak

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
miami_gages <- gage_extract("12086", start_date = "2000-01-01",
                            end_date = "2009-12-31")
miami_q2 <- find_q2(site_no = miami_gages$site_no)

va_counties <- get_county_cd("Virginia")
va_gages <- get_gages(va_counties, start_date = "2015-01-01", end_date = "2015-12-31")
va_q2 <- find_q2(va_gages$site_no)

## End(Not run)

countyfloods documentation built on May 2, 2019, 2:38 a.m.