ams_ie_equations.RdHelper functions that translate the AMS-I.E numbered equations into reproducible R code.
calculate_non_renewable_biomass(biomass_data, consumption_col = "biomass_consumption_tonnes",
fraction = 1, fraction_col = "non_renewable_fraction", group_cols = NULL,
output_col = "non_renewable_biomass_tonnes")
calculate_baseline_energy_content(non_renewable_biomass,
biomass_col = "non_renewable_biomass_tonnes", ncv,
output_col = "baseline_energy_mj")
calculate_baseline_emissions(energy_data, energy_col = "baseline_energy_mj",
emission_factor, output_col = "baseline_emissions_tco2e")
calculate_project_emissions(project_energy, energy_col = "project_energy_mj",
project_emission_factor = 0, output_col = "project_emissions_tco2e")
calculate_emission_reductions(baseline_emissions, project_emissions,
baseline_col = "baseline_emissions_tco2e",
project_col = "project_emissions_tco2e",
output_col = "emission_reductions_tco2e")Tibble containing biomass consumption observations.
Column storing baseline biomass consumption.
Scalar fraction of biomass that is non-renewable when fraction_col is NULL.
Optional column with the fraction of biomass that is non-renewable.
Grouping columns used to aggregate results.
Name of the resulting column returned by the helper.
Tibble produced by calculate_non_renewable_biomass().
Column containing non-renewable biomass values.
Net calorific value in MJ per unit of biomass.
Tibble with baseline thermal energy.
Column containing energy in MJ.
Baseline emission factor in tCO2e/MJ.
Tibble containing project fossil energy.
Project emission factor in tCO2e/MJ.
Tibble with baseline emissions.
Tibble with project emissions.
Column name for baseline emissions.
Column name for project emissions.
A tibble with the requested quantities for each equation.
biomass <- tibble::tibble(
site = c("A", "B"),
biomass_consumption_tonnes = c(10, 12),
non_renewable_fraction = c(0.8, 0.9)
)
non_renewable <- calculate_non_renewable_biomass(
biomass,
consumption_col = "biomass_consumption_tonnes",
fraction_col = "non_renewable_fraction",
group_cols = "site"
)
energy <- calculate_baseline_energy_content(non_renewable, ncv = 15)
emissions <- calculate_baseline_emissions(energy, emission_factor = 0.0001)
#> Error in calculate_baseline_emissions(energy, emission_factor = 1e-04): unused argument (emission_factor = 1e-04)
project <- calculate_project_emissions(tibble::tibble(project_energy_mj = c(100, 120)), 0.00009)
#> Error: `baseline_supply` must contain `baseline_electricity_mwh`.
calculate_emission_reductions(emissions, project)
#> Error: object 'emissions' not found