Description Usage Arguments Value See Also
This function automated making a simple historical graph of the frequency of flooding in prior years. It provides only limited options for customization
1 2 3 4 5 6 7 8 9 10 11 12 | floodgraph(
.data,
.dt,
.wl,
.fldlvl,
.type = c("count", "adjusted"),
.fit = FALSE,
.se = FALSE,
.dotcol = "slateblue",
.linecol = "black",
.bandcol = scales::muted(.dotcol)
)
|
.data |
A source data frame. can be NULL if .dt and .wl are defined in the enclosing environment. |
.dt |
Dates and times. A data column in .data or a data vector defined in the enclosing environment that contains date-time information. Must inherit from POSIXct. |
.wl |
Water level. A numerical data column in .data or a numerical vector defined in the enclosing environment. |
.fldlvl |
The water level that defines a flood event. Needs to be expressed in the same units and the same datum as the water level data.) |
.fit |
|
.se |
|
.dotcol |
Color specification for points on the figure |
.linecol |
Color specification for the optional trendline |
.bandcol |
color specification for the optional error band |
.type. |
Enumerated choices. Possible values include 'count', and 'adjusted'. If 'count', the plot will show the observed number of flood events in each year. If 'adjusted', the value shows an estimate of how many flood events WOULD have happened if data for that year were complete. The adjusted value assumes risk of flooding is independent of whether data is available or not, which may be an unreasonable assumption, especially if flood risk is strongly seasonal. In practice, most NOAA stations have nearly complete data for most years, so the choice makes little difference. |
A list, the first item of whihc is a ggplot
object. The plot has
years across the x axis, and the number of flood events along the Y
axis. Optionally, including a trendline.
If .fit = TRUE
, the list will include second item that
provides summary information about the model fit.
Other Flood frequency analysis functions:
.sim_once()
,
floodcast_tub()
,
floodfreq()
,
floodmean()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.