Summarises monitoring data across reporting periods, combining baseline fuel consumption and residual project fossil energy to return period-level emission reductions.

aggregate_monitoring_periods(
  monitoring_data,
  monitoring_cols = c("year", "month"),
  group_cols = "machine_id",
  consumption_col = "fuel_consumption",
  ncv_col = "net_calorific_value",
  emission_factor_col = "emission_factor",
  project_energy_col = "project_energy_mj"
)

Arguments

monitoring_data

Tibble containing monitoring observations.

monitoring_cols

Character vector specifying the columns that define a monitoring period.

group_cols

Character vector specifying entity-level identifiers (e.g. machine or site IDs).

consumption_col

Name of the column with baseline fuel consumption.

ncv_col

Name of the column with net calorific value in MJ per unit fuel.

emission_factor_col

Name of the column storing the emission factor in tCO2e/MJ.

project_energy_col

Name of the column storing project fossil energy consumption in MJ.

Value

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

Examples

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