Description Usage Arguments Value Examples
Function aggregates gage-level output into county-level output
1 | county_aggregates(flood_stats, county_cd)
|
flood_stats |
Data frame of gage-level output from |
county_cd |
Character vector with the county FIPS code(s) |
A data frame with the following columns:
Name | Type | Description |
county | character | County name |
state | character | State name |
num_gage | numeric | Number of analyzed gages in county |
avg_peak | numeric | Average flood ratio among county gages |
max_peak | numeric | Maximum observed flood ratio |
minor | numeric | Percentage of gages at or above "minor" flood class (flood ratio > 1) |
moderate | numeric | Percentage of gages at or above "moderate" flood class (flood ratio > 1.5) |
major | numeric | Percentage of gages at or above "major" flood class (flood ratio > 2) |
extreme | numeric | Percentage of gages at or above "extreme" flood class (flood ratio > 5) |
max_dur | numeric | Maximum flood duration in county |
avg_dur | numeric | Average flood duration in county |
If threshold = "NWS", the columns "minor", "moderate", "major", and "extreme" are replaced with two columns: "no_flood" and "yes_flood" which show the percentage of gages in the county with or without flooding.
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
va_counties <- get_county_cd("Virginia")
va_gages <- get_gages(va_counties, start_date = "2015-01-01",
end_date = "2015-12-31")
va_flow_data <- get_flow_data(va_gages, start_date = "2015-01-01",
end_date = "2015-12-31")
va_peaks <- find_q2(va_gages$site_no)
va_stats <- flood_analysis(flow_data = va_flow_data, peaks = va_peaks,
gages = va_gages, county_cd = va_counties, threshold = "Q2")
va_county_stats <- county_aggregates(flood_stats = va_stats)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.