Skip to contents

whep (development version)

  • Add decompose_weighted_ratio() for exact Kitagawa/Shapley, additive LMDI, and sequential-polar decomposition of changing aggregate ratios.

  • build_io_model() and build_footprint() gain a method = c("mass", "value") argument for co-product allocation. "value" splits a multi-output process’s inputs (and the pressures embodied in them) across its products by economic value (mass times export price from build_cbs_prices()) instead of mass, falling back to mass for any process whose co-products lack prices. The default "mass" preserves previous results (#100).

  • Add build_livestock_ghg_extension(): aggregate the IPCC enteric and manure emissions pipeline into a greenhouse-gas footprint extension (kg CO2e per area_code x item_cbs_code), with selectable IPCC tier and GWP100 standard, ready to feed compute_footprint(). inst/scripts/footprints.R gains a WHEP_FOOTPRINT_PRESSURE switch to trace GHG instead of land (#100).

  • calculate_livestock_emissions(tier = 1) now also computes manure N2O (direct and indirect) from IPCC default per-head excretion rates, so the default Tier-1 GHG footprint covers enteric CH4 + manure CH4 + manure N2O rather than methane alone (#100).

  • Add build_crop_soil_n2o_extension(): IPCC 2019 Tier 1 nitrous-oxide from nitrogen applied to managed soils – synthetic fertiliser (F_SN), applied manure (F_ON, FAOSTAT “Manure applied to soils”), and above-ground crop residues (F_CR, residue dry matter times Table 11.1a N content, net of removal) – as a CO2e footprint extension keyed by (area_code, item_cbs_code). F_SN and F_ON are FAOSTAT country totals allocated to crops by harvested area. Direct (EF1), indirect volatilisation (FracGASF for synthetic, FracGASM for manure; residues excluded) and leaching per Ch. 11; EFs verified against the IPCC source. Grazing deposition (F_PRP) and below-ground residue N are documented follow-ups (#100).

  • Add build_footprint() and align_extension(): trace a long-format extension table through the supply chain end to end, de-duplicating the per-year alignment glue previously repeated across the footprint driver scripts (#100).

  • Fix non-dairy cattle being misclassified as dairy in the livestock emission factors: a case-insensitive "dairy" match also matched the "Cattle, non-dairy" item name, so beef cattle received the much larger dairy enteric and manure factors. Non-dairy cattle CH4 (Tier 1 and Tier 2) is now classified correctly.

  • Fix prepare_livestock_emissions() failing on real production data when live_anim_code is supplied as an integer.

  • Fix build_io_model() not passing the now-required feed_mode argument to the feed-redistribution step.

whep 0.3.0

CRAN release: 2026-03-03

whep 0.2.0

CRAN release: 2025-10-15

whep 0.1.0

CRAN release: 2025-07-25