Summarises simulated or observed electricity supply data for each monitoring period using the AMS-I.D calculation helpers.

aggregate_monitoring_periods(supply_data, monitoring_cols = c("year", "month"), group_cols = "grid_id", electricity_col = "electricity_mwh", baseline_factor_col = "baseline_emission_factor", project_col = "project_emissions_tco2e")

Arguments

supply_data

Tibble containing monitoring observations, including the specified grouping and monitoring columns.

monitoring_cols

Character vector specifying the columns that define a monitoring period.

group_cols

Character vector specifying entity-level identifiers.

electricity_col

Name of the column with electricity supplied for each observation in MWh.

baseline_factor_col

Name of the column storing the baseline emission factor.

project_col

Name of the project emissions column aggregated across the period.

Value

A tibble aggregated by entity and monitoring period with baseline electricity, baseline emissions, project emissions, and emission reductions.

Examples

data <- simulate_ams_id_dataset(n_grids = 2, n_periods = 3)
aggregate_monitoring_periods(data)
#> Error: `useful_energy_col` must be present in `thermal_data`.