Equation (3) of AMS-III.F accounts for transport of compost, residual waste requiring disposal, and avoided emissions from fertiliser displacement.

calculate_leakage_emissions_iiif(
  data,
  compost_transported_col = "compost_transported_tonnes",
  transport_distance_col = "transport_distance_km",
  transport_emission_factor_col = "transport_ef_tco2_per_tkm",
  residual_waste_col = NULL,
  residual_waste_emission_factor_col = NULL,
  displaced_fertiliser_col = NULL,
  displaced_fertiliser_emission_factor_col = NULL,
  group_cols = NULL,
  output_col = "leakage_emissions_tco2e"
)

Arguments

data

Tibble containing leakage monitoring data.

compost_transported_col

Column storing the mass of compost transported (tonnes).

transport_distance_col

Column storing transport distance (km).

transport_emission_factor_col

Column storing transport emission factors (tCO2e per tonne-km).

residual_waste_col

Column storing residual waste requiring disposal (tonnes).

residual_waste_emission_factor_col

Optional column storing emission factors for residual waste treatment (tCO2e per tonne).

displaced_fertiliser_col

Column storing the amount of synthetic fertiliser displaced.

displaced_fertiliser_emission_factor_col

Optional column storing the emission factor associated with displaced fertiliser (tCO2e per unit).

group_cols

Optional character vector specifying grouping columns.

output_col

Name of the output column containing leakage emissions in tCO2e.

Value

Tibble containing grouped leakage emissions in tCO2e.

Examples

leakage <- tibble::tibble(
  site_id = c("A", "B"),
  compost_transported_tonnes = c(900, 760),
  transport_distance_km = c(25, 30),
  transport_ef_tco2_per_tkm = 0.0001,
  displaced_fertiliser_tonnes = c(50, 45),
  fertiliser_ef_tco2_per_tonne = 0.4
)
calculate_leakage_emissions_iiif(leakage)
#> Error in dplyr::mutate(data_tbl, .transport_component = .data[[compost_transported_col]] *     .data[[transport_distance_col]] * .data[[transport_emission_factor_col]],     .residual_component = if (!is.null(residual_waste_col) &&         !is.null(residual_waste_emission_factor_col)) {        .data[[residual_waste_col]] * .data[[residual_waste_emission_factor_col]]    } else {        0    }, .displacement_component = if (!is_null_dual(displaced_fertiliser_col,         displaced_fertiliser_emission_factor_col)) {        .data[[displaced_fertiliser_col]] * .data[[displaced_fertiliser_emission_factor_col]]    } else {        0    }, .leakage_component = .transport_component + .residual_component -         .displacement_component):  In argument: `.residual_component = if (...) NULL`.
#> Caused by error in `.data[["residual_waste_tonnes"]]`:
#> ! Column `residual_waste_tonnes` not found in `.data`.