Package: whep 0.3.0.9000

Catalin Covaci

whep: Processing Agro-Environmental Data

A set of tools for processing and analyzing data developed in the context of the "Who Has Eaten the Planet" (WHEP) project, funded by the European Research Council (ERC). For more details on multi-regional input–output model "Food and Agriculture Biomass Input–Output" (FABIO) see Bruckner et al. (2019) <doi:10.1021/acs.est.9b03554>.

Authors:Catalin Covaci [aut, cre], Eduardo Aguilera [aut, cph], Alice Beckmann [aut], Juan Infante [aut], Justin Morgan [aut], João Serra [ctb], European Research Council [fnd]

whep_0.3.0.9000.tar.gz
whep_0.3.0.9000.zip(r-4.7)whep_0.3.0.9000.zip(r-4.6)whep_0.3.0.9000.zip(r-4.5)
whep_0.3.0.9000.tgz(r-4.6-any)whep_0.3.0.9000.tgz(r-4.5-any)
whep_0.3.0.9000.tar.gz(r-4.7-any)whep_0.3.0.9000.tar.gz(r-4.6-any)
whep_0.3.0.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
whep/json (API)
NEWS

# Install 'whep' in R:
install.packages('whep', repos = c('https://eduaguilera.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/eduaguilera/whep/issues

Pkgdown/docs site:https://eduaguilera.github.io

Datasets:

On CRAN:

Conda:

agriculturebiogeochemistrybiophysical-modelingcarboncropsenvironmentfootprintsland-uselivestocknitrogennutritionphosphorusplanetary-boundariesquantitative-historysocial-metabolismwater

5.88 score 1 stars 7 scripts 136 downloads 56 exports 61 dependencies

Last updated from:5e06cfe120. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK211
source / vignettesOK214
linux-release-x86_64OK178
macos-release-arm64OK133
macos-oldrel-arm64OK174
windows-develOK171
windows-releaseOK306
windows-oldrelOK150
wasm-releaseOK140

Exports:add_area_codeadd_area_nameadd_footprint_product_stageadd_item_cbs_codeadd_item_cbs_nameadd_item_prod_codeadd_item_prod_namebuild_cbs_pricesbuild_commodity_balancesbuild_detailed_tradebuild_gridded_landusebuild_gridded_livestockbuild_io_modelbuild_primary_pricesbuild_primary_productionbuild_processing_coefsbuild_supply_usebuild_trade_pricescalculate_cohorts_systemscalculate_enteric_ch4calculate_livestock_emissionscalculate_lmdicalculate_manure_emissionscalculate_nue_cropscalculate_nue_livestockcalculate_system_nuecalculate_uncertainty_boundscompute_footprintcompute_footprint_pathscompute_fp_product_pathscompute_leontief_inversecreate_n_nat_destinycreate_n_productioncreate_n_prov_destinycreate_n_soil_inputsestimate_energy_demandexpand_trade_sourcesfill_linearfill_proxy_growthfill_sumget_bilateral_tradeget_faostat_dataget_feed_intakeget_land_fp_productionget_primary_productionget_primary_residuesget_processing_coefsget_wide_cbsharmonize_interpolateharmonize_simpleplot_footprint_sankeyprepare_livestock_emissionsrun_spatializewhep_clear_cachewhep_list_file_versionswhep_read_file

Dependencies:arrowaskpassassertthatbitbit64classclassIntclicliprcpp11crayoncurldata.tabledigestdplyre1071FAOSTATfsgenericsgluehmshttrjsonliteKernSmoothlabelinglatticelifecyclemagrittrMASSMatrixmimenanoparquetopensslpillarpinspkgconfigplyrprettyunitsprogressproxypurrrR6rappdirsRcppreadrRJSONIOrlangstringistringrsystibbletidyrtidyselecttzdbutf8vctrsvroomwhiskerwithryamlzoo

Environmental footprint analysis

Rendered fromfootprint-analysis.Rmdusingknitr::rmarkdownon Jun 08 2026.

Last update: 2026-06-08
Started: 2026-06-08

Trade sources year coverage

Rendered fromtrade-sources-coverage.Rmdusingknitr::rmarkdownon Jun 08 2026.

Last update: 2025-07-18
Started: 2025-01-13

Readme and manuals

Help Manual

Help pageTopics
Get area codes from area namesadd_area_code
Get area names from area codesadd_area_name
Add a final-demand product-area stage to footprints.add_footprint_product_stage
Get commodity balance sheet item codes from item namesadd_item_cbs_code
Get commodity balance sheet item names from item codesadd_item_cbs_name
Get production item codes from item namesadd_item_prod_code
Get production item names from item codesadd_item_prod_name
Animal codes and classificationsanimals_codes
Biomass coefficients for crops and livestock productsbiomass_coefs
Build CBS item pricesbuild_cbs_prices
Build commodity balance sheetsbuild_commodity_balances
Build detailed bilateral trade matrixbuild_detailed_trade
Build gridded landuse datasetbuild_gridded_landuse
Build gridded livestock datasetbuild_gridded_livestock
Build multi-regional input-output model.build_io_model
Build primary item pricesbuild_primary_prices
Build primary production datasetbuild_primary_production
Build processing coefficientsbuild_processing_coefs
Supply and use tablesbuild_supply_use
Build global trade pricesbuild_trade_prices
Calculate cohort and production system distribution.calculate_cohorts_systems
Calculate enteric methane emissions.calculate_enteric_ch4
Calculate all livestock emissions.calculate_livestock_emissions
Calculate LMDI decomposition.calculate_lmdi
Calculate manure emissions (CH4 + N2O).calculate_manure_emissions
N soil inputs and Nitrogen Use Efficiency (NUE) for cropcalculate_nue_crops
NUE for Livestockcalculate_nue_livestock
System NUEcalculate_system_nue
Calculate uncertainty bounds for livestock emissions.calculate_uncertainty_bounds
Commodity balance sheet processing fractionscb_processing
CBS to trade item code mappingcbs_trade_codes
FAOSTAT crop to LPJmL crop functional type (CFT) mappingcft_mapping
Climate-zone MCF values.climate_mcf
Compute environmental footprints.compute_footprint
Compute first-use footprint paths.compute_footprint_paths
Compute final-product footprint paths.compute_fp_product_paths
Compute Leontief inverse.compute_leontief_inverse
GRAFS Nitrogen (N) flows at Spain national levelcreate_n_nat_destiny
N production for Spaincreate_n_production
GRAFS Nitrogen (N) flowscreate_n_prov_destiny
Nitrogen (N) soil inputs for Spaincreate_n_soil_inputs
Eurostat crop classification codescrops_eurostat
Manure nitrogen application by crop and countrycrops_manure_n
Estimate energy demand (Gross Energy) - Tier 2estimate_energy_demand
Trade data sourcesexpand_trade_sources
Feed characteristics by diet quality.feed_characteristics
Fill gaps by linear interpolation, or carrying forward or backward.fill_linear
Fill gaps using growth rates from proxy variablesfill_proxy_growth
Fill gaps summing the previous value of a variable to the value of another variable.fill_sum
Bilateral trade dataget_bilateral_trade
Scrapes activity_data from FAOSTAT and slightly post-processes itget_faostat_data
Livestock feed intakeget_feed_intake
Get land footprint data for local production.get_land_fp_production
Primary items productionget_primary_production
Crop residue itemsget_primary_residues
Processed products share factorsget_processing_coefs
Commodity balance sheet data.get_wide_cbs
GLEAM animal weights.gleam_animal_weights
Nitrogen parameters for crop residues of feed materials.gleam_crop_residue_nitrogen
GLEAM crop residue parameters.gleam_crop_residue_params
GLEAM dressing percentages.gleam_dressing_percentages
Energy use emission factors by species and system.gleam_energy_use_ef
GLEAM enteric fermentation parameters.gleam_enteric_params
GLEAM feed categories.gleam_feed_categories
GLEAM feed use efficiency.gleam_feed_composition
GLEAM feed conversion ratios for monogastrics.gleam_feed_conversion_ratios
GLEAM feed digestibility for ruminants.gleam_feed_digestibility
Emission factors for field operations on feed materials.gleam_field_operation_ef
Country-level fraction of crop residues removed.gleam_fracremove
GLEAM geographic hierarchy.gleam_geographic_hierarchy
GLEAM livestock categories.gleam_livestock_categories
Country-level mechanization levels for feed materials.gleam_mechanization_levels
GLEAM milk production.gleam_milk_production
GLEAM manure management system shares.gleam_mms_shares
Processing and transport emission factors for feeds.gleam_processing_transport_ef
Grazing energy coefficients.grazing_energy_coefs
Harmonize advanced cases with interpolation for 1:N groupsharmonize_interpolate
Harmonize rows labeled "simple" by summing valuesharmonize_simple
Indirect N2O emission factors.indirect_n2o_ef
IPCC 2006 Tier 1 enteric emission factors.ipcc_2006_enteric_ef
IPCC 2006 Tier 1 manure emission factors.ipcc_2006_manure_ef
IPCC 2006 MCF by temperature.ipcc_2006_mcf_temp
IPCC 2019 Bo values (Table 10.16).ipcc_2019_bo
IPCC 2019 Cfi values (Table 10.4).ipcc_2019_cfi
IPCC 2019 enteric EF for cattle.ipcc_2019_enteric_ef_cattle
IPCC 2019 enteric EF for non-cattle.ipcc_2019_enteric_ef_other
IPCC 2019 manure CH4 EF for cattle.ipcc_2019_manure_ch4_ef_cattle
IPCC 2019 manure CH4 EF for non-cattle.ipcc_2019_manure_ch4_ef_other
IPCC 2019 MCF for manure management.ipcc_2019_mcf_manure
IPCC 2019 nitrogen excretion rates.ipcc_2019_n_excretion
IPCC 2019 direct N2O emission factors.ipcc_2019_n2o_ef_direct
IPCC 2019 Ym values (Table 10.12).ipcc_2019_ym
Tier 2 Bo values.ipcc_tier2_bo_values
Tier 2 energy coefficients.ipcc_tier2_energy_coefs
Tier 2 manure ash content.ipcc_tier2_manure_ash
Tier 2 nitrogen retention fractions.ipcc_tier2_n_retention
Tier 2 Ym values.ipcc_tier2_ym_values
Commodity balance sheet itemsitems_cbs
Full CBS item tableitems_full
Primary production items linked to CBSitems_prim
Primary production itemsitems_prod
Full production item tableitems_prod_full
Grassland share of synthetic nitrogen by country and yearlassaletta_grassland_share
Livestock unit coefficientsliv_lu_coefs
Livestock physical constants.livestock_constants
Default production parameters.livestock_production_defaults
Synthetic nitrogen application rates by crop and countrymueller_synthetic_n
Interactive footprint Sankey viewerplot_footprint_sankey
Politiespolities
Polity categories and regional classificationspolities_cats
Prepare production data for livestock emission calculations.prepare_livestock_emissions
Items with double-counting in production statisticsprimary_double
Regional MMS distribution.regional_mms_distribution
Full polity and region reference tableregions_full
Run the gridded land-use spatialization pipelinerun_spatialize
Smil (2001) global synthetic nitrogen production, 1913-2000smil_2001_synthetic_n_global
Temperature adjustment factors for NEm.temperature_adjustment
Uncertainty ranges for emission parameters.uncertainty_ranges
Clear the build pipeline cachewhep_clear_cache
External inputswhep_inputs
Input file versionswhep_list_file_versions
Download, cache and read fileswhep_read_file