aggregate_monitoring_periods.RdSummarises simulated or observed thermal energy data for each monitoring period, returning baseline thermal output, baseline emissions, project emissions, and emission reductions.
aggregate_monitoring_periods(
thermal_data,
monitoring_cols = c("year", "month"),
group_cols = "facility_id",
energy_col = "thermal_energy_mwh",
baseline_factor_col = "baseline_emission_factor",
project_col = "project_emissions_tco2e"
)Tibble containing monitoring observations, including the columns listed in group_cols and monitoring_cols plus thermal energy and emission information.
Character vector specifying the columns that define a monitoring period.
Character vector specifying entity-level identifiers (e.g. facility_id).
Name of the column with thermal energy delivered for each observation in MWhth.
Name of the column storing the baseline emission factor.
Name of the project emissions column (aggregated as the sum across the period).
Tibble aggregated by entity and monitoring period with columns for baseline thermal output, baseline emissions, project emissions, and emission reductions.
data <- simulate_ams_ic_dataset(n_facilities = 2, n_periods = 3)
aggregate_monitoring_periods(data)
#> Error: `useful_energy_col` must be present in `thermal_data`.