Learn R Programming

countyfloods (version 0.0.2)

time_series_plot: Function plots time series data by county

Description

Displays four time series bar charts per county displaying the number of gages with flooding, maximum flood ratio, average flood ratio, and the percent of gages above a specified flood threshold.

Usage

time_series_plot(county_series, category = "moderate", start_date = NULL,
  end_date = NULL)

Arguments

county_series

Data frame of flood time series results by county, output of time_series_flood function.

category

Character string of the flood magnitude category to be used for mapping (one of "minor", "moderate", "major", or "extreme").

start_date

Character string of start date for x-axis of plots. If not specified, defaults to the earliest observed flood in the data.

end_date

Character string of end date for x-axis of plots. If not specified, defaults to the latest observed flood in the data.

Value

Four time series bar charts per county displaying the number of gages with flooding, maximum flood ratio, average flood ratio, and the percent of gages above a specified flood threshold.

Examples

Run this code
# NOT RUN {
#Use Q2 as flood threshold
va_time_series <- time_series_flood(state = "Virginia", start_date = "2015-01-01",
                      end_date = "2015-12-31", threshold = "Q2")

#Map results
time_series_plot(va_time_series[[2]])
# }

Run the code above in your browser using DataLab