Skip to contents

Aggregates a daily precipitation series to a month-by-day climatology and draws it as a tile heatmap (the "precipitation matrix"). Requires the ggplot2 package.

Usage

rh_plot_climatology(data, date_col = "date", value_col = "value", fun = mean)

Arguments

data

A data frame with a date column and a value column.

date_col, value_col

Column names (strings) holding the dates and the precipitation values. Default "date" and "value".

fun

Aggregation function applied per calendar day across years. Default mean().

Value

A ggplot2 object.

Examples

if (requireNamespace("ggplot2", quietly = TRUE)) {
  rh_plot_climatology(precip_pi)
}