aggregate_monitoring_periods.RdBuilding monitoring data are often recorded monthly or quarterly. This helper aggregates tidy monitoring records to the reporting period (typically annual).
aggregate_monitoring_periods(
monitoring_data,
period_col = "monitoring_period",
group_cols = NULL,
summarise_cols = NULL,
output_col = "monitoring_period"
)Tibble containing monitoring records.
Column containing the monitoring period label (e.g. month or quarter).
Character vector of columns describing building identifiers.
Optional character vector of numeric columns to sum. If NULL, all numeric columns are aggregated.
Name of the column storing the concatenated period labels.
A tibble aggregated by group_cols with numeric columns summed over the monitoring period.
monitoring <- tibble::tibble(
building_id = rep("Office_A", 3),
month = c("Jan", "Feb", "Mar"),
project_total_energy_mwh = c(10.5, 9.8, 9.2),
service_level_indicator = c(0.32, 0.31, 0.33)
)
aggregate_monitoring_periods(monitoring, period_col = month, group_cols = "building_id")
#> Error in aggregate_monitoring_periods(monitoring, period_col = month, group_cols = "building_id"): unused argument (period_col = month)