Validates methane capture, destruction technology, and operating schedules for wastewater methane recovery projects.

check_applicability_recovery_system_iiih(
  data,
  capture_system_col = "gas_capture_installed",
  destruction_technology_col = "destruction_technology",
  eligible_technologies = c(
    "enclosed flare",
    "boiler firing",
    "electricity generation",
    "biogas upgrading"
  ),
  operating_hours_col = "operating_hours_per_week",
  minimum_operating_hours = 25,
  redundancy_col = "redundancy_installed",
  utilisation_documented_col = "utilisation_documented",
  group_cols = NULL,
  output_col = "recovery_applicable"
)

Arguments

data

Tibble containing recovery system metadata.

capture_system_col

Column indicating whether a gas-tight cover or digester is installed.

destruction_technology_col

Column describing the destruction or utilisation technology.

eligible_technologies

Technologies eligible under AMS-III.H.

operating_hours_col

Column storing weekly operating hours.

minimum_operating_hours

Minimum weekly operating hours required for applicability.

redundancy_col

Optional column confirming redundant destruction equipment or storage.

utilisation_documented_col

Optional column confirming utilisation routes are documented.

group_cols

Optional character vector specifying grouping columns.

output_col

Name of the logical output column summarising compliance.

Value

Tibble indicating whether recovery systems satisfy AMS-III.H requirements.

Examples

recovery <- tibble::tibble(
  site_id = c("WW1", "WW2"),
  gas_capture_installed = c(TRUE, FALSE),
  destruction_technology = c("enclosed flare", "flare"),
  operating_hours_per_week = c(45, 12)
)
check_applicability_recovery_system_iiih(recovery, group_cols = "site_id")
#> Error in dplyr::mutate(data_tbl, .capture_applicable = .data[[capture_system_col]] %in%     TRUE | tolower(trimws(.data[[capture_system_col]])) %in%     c("yes", "true"), .technology_applicable = tolower(trimws(.data[[destruction_technology_col]])) %in%     eligible_technologies, .operating_applicable = .data[[operating_hours_col]] >=     minimum_operating_hours, .redundancy_applicable = if (!is.null(redundancy_col)) .data[[redundancy_col]] %in%     TRUE else TRUE, .utilisation_applicable = if (!is.null(utilisation_documented_col)) {    .data[[utilisation_documented_col]] %in% TRUE | tolower(trimws(.data[[utilisation_documented_col]])) %in%         c("yes", "true")} else {    TRUE}, .applicable = .capture_applicable & .technology_applicable &     .operating_applicable & .redundancy_applicable & .utilisation_applicable):  In argument: `.redundancy_applicable = if (...) NULL`.
#> Caused by error in `.data[["redundancy_installed"]]`:
#> ! Column `redundancy_installed` not found in `.data`.