View source: R/metal_emissions.R
metal_emissions | R Documentation |
Computes embodied GHG emissions for metals using uk_gov_data
rows with
Level 2 = "Metal". Material-use factors come from
Level 1 = "Material use", Column Text = material_production
. Waste factors
come from Level 1 = "Waste disposal", Column Text = waste_disposal
.
Factors are kg CO2e per tonne.
metal_emissions(
use = stats::setNames(numeric(), character()),
waste = TRUE,
material_production = "Primary material production",
waste_disposal = c("Closed-loop", "Combustion", "Landfill", "Open-loop"),
units = c("kg", "tonnes"),
value_col = c("value", "value_2024"),
strict = TRUE
)
use |
Named numeric vector of metal quantities in tonnes.
Canonical names supported: |
waste |
Logical. If |
material_production |
Either a single string applied to all metals, or a
named vector per metal type. Accepted values (matched leniently):
|
waste_disposal |
One of |
units |
Output units: |
value_col |
Which numeric column in |
strict |
If |
Numeric total emissions in requested units
.
# Primary for all; landfill; waste = use
metal_emissions(
use = c(aluminium = 1.2, steel_cans = 0.4),
material_production = "Primary material production",
waste_disposal = "Landfill",
waste = TRUE,
units = "kg"
)
# Per-metal: aluminium closed-loop source, others primary; no waste; 2024 factors
metal_emissions(
use = c(`Metal: aluminium cans and foil (excl. forming)` = 0.5, mixed_cans = 0.2),
material_production = c(aluminium = "closed loop"),
waste = FALSE,
value_col = "value_2024",
units = "tonnes"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.