Implements Equation (1) of AMS-II.C by aggregating the baseline energy consumption for the
retrofit boundary. The helper accepts tidy input data and returns grouped totals expressed
in megawatt-hours (MWh).
calculate_baseline_energy_consumption(
baseline_data,
energy_col = "baseline_energy_mwh",
group_cols = NULL,
output_col = "baseline_energy_mwh"
)
Arguments
- baseline_data
A tibble containing baseline energy consumption values.
- energy_col
Column name holding baseline energy use in MWh.
- group_cols
Optional character vector of grouping columns to preserve in the output.
- output_col
Name of the resulting column storing baseline energy in MWh.
Value
A tibble with grouped baseline energy totals.
Examples
baseline <- tibble::tibble(site = c("A", "A", "B"),
baseline_energy_mwh = c(12, 34, 28))
calculate_baseline_energy_consumption(baseline, group_cols = "site")
#> # A tibble: 2 × 2
#> site baseline_energy_mwh
#> <chr> <dbl>
#> 1 A 46
#> 2 B 28