ctf_heatmap: Create a heatplot for flow and cease-to-flow periods in a...

Description Usage Arguments Value Examples

Description

Create a heatplot for flow and cease-to-flow periods in a daily time-series.

Usage

1
2
ctf_heatmap(df, threshold = 0, units = "ML/day", format = "%d/%m/%Y",
  cols = c(1, 2))

Arguments

df

A dataframe with date in the first column (as character) and discharge in the second (can be modified with cols.

threshold

The threshold used to indicate cease to flow.

units

The units of the time series (used for the y-axis label).

format

The date format used (default = '%d/%m/%Y').

cols

The columns of the Date and discharge fields (default = c(1,2)).

Value

A ggplot object.

Examples

1
2
3
4
5
6
7
8
9
library(hydrostats)
data(Cooper)
ctf_heatmap(Cooper)

data(Acheron)
df <- rbind(data.frame(River='Acheron', Acheron), data.frame(River='Cooper', Cooper))
ctf_plots <- dlply(df, .(River), function(x) ctf_heatmap(x, threshold=1000, cols=c(2,3)))
ctf_plots[[1]]
ctf_plots[[2]]

nickbond/hydroplots documentation built on May 23, 2019, 4:46 p.m.