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-any)whep_0.3.0.9000.zip(r-4.6-any)whep_0.3.0.9000.zip(r-4.5-any)
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✨
DESCRIPTION |NEWS
card.svg |card.png
whep/json (API)

# 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

6.49 score 1 stars 11 scripts 355 downloads 319 exports 56 dependencies

Last updated from:3205ff19c9. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK1286
source / vignettesOK566
linux-releaseOK1560
macos-releaseOK1347
macos-oldrelOK1290
windows-develOK1956
windows-releaseOK1970
windows-oldrelOK1759
wasm-releaseOK359

Exports:add_area_codeadd_area_nameadd_footprint_product_stageadd_item_cbs_codeadd_item_cbs_nameadd_item_prod_codeadd_item_prod_nameadd_manure_beddingadd_polity_codeadmin_coverage_prototypeadmin_shares_prototypeadmin_shares_schemaaggregate_grass_to_polityaggregate_unit_extentalign_extensionallocate_grazing_to_productsallocate_level_cropsallocate_manure_to_landallocate_manure_transportapply_management_lossesassert_footprint_invariantsassert_parquet_integrityassert_table_schemaattach_provenanceattach_scopeattribute_fallow_to_cropsbackcast_admin_sharesbalance_io_flowsbalance_rasbuild_ag_land_supportbuild_allocation_layerbuild_carbon_balancebuild_carbon_inputsbuild_cbs_pricesbuild_cell_climate_zonebuild_cell_moisture_regimebuild_cell_politybuild_commodity_balancesbuild_constant_territory_seriesbuild_critical_n_bindingbuild_crop_land_extensionbuild_crop_soil_n2o_extensionbuild_crop_water_consumptionbuild_crop_water_usebuild_cropgrids_land_extensionbuild_detailed_tradebuild_energy_co2_extensionbuild_fao_arable_fallow_extensionbuild_feed_demandbuild_feed_intake_localbuild_food_supplybuild_footprintbuild_grass_availabilitybuild_grass_availability_lpjmlbuild_grass_natural_carbon_inputsbuild_grassland_intensity_classesbuild_grassland_land_extensionbuild_grazing_feed_footprintbuild_gridded_landusebuild_gridded_livestockbuild_gridded_livestock_emissionsbuild_hayr_land_extensionbuild_historical_land_areasbuild_human_nbuild_intake_dispersionbuild_io_modelbuild_land_balance_footprintbuild_level_crop_targetsbuild_livestock_ghg_extensionbuild_livestock_nutrient_flowsbuild_loss_wedgebuild_n_boundary_countrybuild_n_boundary_exceedancebuild_n_boundary_percapitabuild_n_depositionbuild_n_exceedance_extensionbuild_n_inputsbuild_n_loss_driversbuild_n_pathway_exceedancebuild_n_percapitabuild_nitrogen_balancebuild_nourishment_bandbuild_polycell_land_usesbuild_polycell_supportbuild_primary_pricesbuild_primary_productionbuild_processing_coefsbuild_protein_qualitybuild_protein_requirementbuild_protein_scorebuild_regime_yield_ratiobuild_residue_bedding_supplybuild_sjos_n_footprintbuild_sjos_nitrogenbuild_soil_carbon_inputsbuild_supply_usebuild_total_population_gridbuild_trade_pricesbuild_urban_nbuild_water_balancecalculate_bnfcalculate_cohorts_systemscalculate_critical_ncalculate_crop_bnfcalculate_crop_nppcalculate_crop_npp_componentscalculate_crop_residuescalculate_crop_rootscalculate_enteric_ch4calculate_food_ginicalculate_indirect_n2o_nh3calculate_livestock_emissionscalculate_lmdicalculate_manner_nh3calculate_manner_nh3_defaultcalculate_manure_emissionscalculate_n_leachingcalculate_n_surpluscalculate_nh3calculate_nonsymbiotic_bnfcalculate_npp_carbon_nitrogencalculate_nue_cropscalculate_nue_livestockcalculate_potential_nppcalculate_residue_destiniescalculate_soc_amgcalculate_soc_centurycalculate_soc_dynamicscalculate_soc_hsoccalculate_soc_icbmcalculate_soc_lpjmlcalculate_soc_rothccalculate_soil_n2ocalculate_system_nuecalculate_uncertainty_boundscalculate_weed_bnfcheck_arable_compositioncheck_extent_jumpscheck_fodder_land_sharecheck_footprint_conservationcheck_inputs_suppliedcheck_keys_completecheck_labels_suppliedcheck_parquet_integritycheck_series_jumpscheck_supply_use_balancecheck_table_schemaclassify_sjos_ncombine_covcombine_row_evidencecompare_footprint_methodscompute_footprintcompute_footprint_balancecompute_footprint_pathscompute_fp_product_pathscompute_leontief_inversecompute_trade_flows_rawconsolidate_sourcescorrect_n_depositioncreate_alfredos_typologiescreate_finn_indicatorcreate_grafs_plot_dfcreate_n_nat_destinycreate_n_productioncreate_n_prov_destinycreate_n_soil_inputscreate_typologies_grafs_spaincreate_typologies_of_josettecreate_typologies_whepdecompose_crop_livestock_conndecompose_cropland_surplusdecompose_destiny_mixdecompose_manure_lossesdecompose_semi_natural_surplusdecompose_specialization_covdecompose_terr_lossesdecompose_terr_losses_periodsdecompose_urban_lossesdecompose_weighted_ratiodisaggregate_ussrempty_table_from_schemaensure_admin_sharesensure_columnsestimate_energy_demandestimate_n_excretionevidence_conflictsevidence_forexpand_polycell_yearsexpand_trade_sourcesfill_linearfill_proxy_growthfill_sumfolded_reporting_areasfootprint_scopefootprint_sensitivityget_arable_permanent_landget_bilateral_tradeget_crop_land_extensionget_feed_intakeget_polity_geometriesget_primary_productionget_primary_residuesget_processing_coefsget_provenanceget_scopeget_soc_climate_driversget_wide_cbsglwd_water_fractiongrass_access_sharesgridded_fallow_weightsharmonize_interpolateharmonize_simpleinterp_veckey_lattice_gapslivestock_emissions_to_ktmake_lpjml_covariatemelt_bilateral_tradenormalize_nourishmentplot_compart_factorplot_compart_factor_periodsplot_compart_factor_rollplot_compart_factor_roll_panelplot_compart_factor_yearlyplot_crop_livestock_connplot_destiny_mixplot_finn_circularityplot_footprint_sankeyplot_input_outputplot_input_output_livestockplot_input_output_systemplot_loss_decompplot_loss_decomp_periodsplot_loss_decomp_periods_panelplot_loss_decomp_rollingplot_loss_decomp_rolling_panelplot_loss_decomp_yearlyplot_national_trade_flows_rawplot_national_trade_validationplot_specialization_covplot_typology_indicators_panelplot_typology_periods_panelpolity_anchor_driftpolity_bucket_coveragepolity_coverage_gapspolity_identity_conventionspolity_mapping_provenancepolycell_example_geometriespopulation_source_reachprepare_livestock_emissionspropagate_fp_uncertaintyread_admin_familyread_admin_sharesread_admin_stats_eurostatread_admin_stats_nassread_admin_stats_sidraread_critical_nread_cru_climateread_emep_depositionread_fbs_populationread_glaciated_areasread_glw_densityread_glwd_waterread_habitual_cvread_hwsd_topsoil_socread_hyde_populationread_level_country_gridread_lpjml_crop_coverread_lpjml_grass_productivityread_lpjml_hydrologyread_lpjml_litterfallread_lpjml_natural_coverread_lpjml_nppread_lpjml_regime_yieldread_lpjml_windread_luh2_landuseread_luh2_terrestrialread_n_depositionread_polycell_supportread_populationread_soil_hydraulicread_soil_phread_spam_yieldsread_wpp_populationreconcile_admin_allocationrecord_provenanceredistribute_feedresolve_admin_sharesresolve_admin_unitsresolve_polity_labelresolve_polity_lineagerow_evidencerow_evidence_schemarow_promotion_statusrun_spatializerun_typology_sensitivityseam_gateseam_gate_tolerancessoc_crop_groupsoc_rate_modifier_amgsoc_rate_modifier_centurysoc_rate_modifier_icbmsoc_rate_modifier_lpjmlsoc_rate_modifier_rothcspatialize_country_n_to_cropssplit_manure_managementsplit_regime_yieldstamp_inputs_suppliedsummarise_conservationsummarize_bnfunit_cropland_extentvalidate_national_tradevalidate_national_trade_rawwhep_clear_cachewhep_coef_tablewhep_list_file_versionswhep_read_filewhep_registrywrite_parquet_checkedwrite_table_checked

Dependencies:arrowaskpassassertthatbitbit64clicliprcpp11crayoncurldata.tabledeSolvedigestdplyrfarverfsgenericsgluehmshttrjsonlitelabelinglatticelifecyclemagrittrMatrixmimenanoparquetopensslpillarpinspkgconfigprettyunitsprogresspurrrR6rappdirsRColorBrewerreadrrlangscalesstringistringrsystibbletidyrtidyselecttzdbutf8vctrsviridisLitevroomwhiskerwithryamlzoo

Constant-territory time series
The problem | The method (dasymetric areal interpolation) | Why a covariate, not just area | How the gap is handled | Usage | Worked example

Last update: 2026-08-07
Started: 2026-08-07

Environmental footprint analysis
What is a footprint analysis? | The three-step pipeline | Concepts and terminology | Supply-use tables and process groups | Mixed units in the supply-use system | Bilateral trade | Commodity balance sheets (CBS) | The Z matrix (inter-industry flows) | Trade shares | The Y matrix (final demand) | The X vector (total output) | FABIO adjustments | The Leontief inverse (L) | Environmental extensions | The footprint | Running the analysis | Step 1: Build the IO model | Step 2: Compute the Leontief inverse | For large systems | Step 3: Compute the footprint | Dense path (pre-computed L, small systems) | Using Z directly (large systems) | With and without fd_labels | Analysing the results | A conservation check | Processing multiple years | Parallel execution (optional) | Summary | References

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

Trade sources year coverage

Last update: 2026-07-24
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
Add bedding carbon and nitrogen to the housed manure streams.add_manure_bedding
Add WHEP polity codes to a tableadd_polity_code
Zero-row prototype of the run's admin-coverage reportadmin_coverage_prototype
Eurostat crop classes and their WHEP itemsadmin_items_eurostat
JRC subnational crop classes and their WHEP itemsadmin_items_jrc
USDA NASS crop series and their WHEP itemsadmin_items_nass
IBGE SIDRA crop classes and their WHEP itemsadmin_items_sidra
The admin-shares zero-row prototypeadmin_shares_prototype
The admin-shares table contractadmin_shares_schema
Source-item vocabularies for the subnational admin statisticsadmin_source_vocabularies
Eurostat livestock classes and their WHEP species groupsadmin_species_eurostat
USDA NASS livestock series and their WHEP species groupsadmin_species_nass
IBGE SIDRA herd types and their WHEP species groupsadmin_species_sidra
Aggregate gridded grass availability to polity totals.aggregate_grass_to_polity
Aggregate a gridded land quantity onto administrative unitsaggregate_unit_extent
Align an extension table to input-output sector labels.align_extension
Allocate grazing land forward to livestock products.allocate_grazing_to_products
Allocate national crop areas at a granted containment depthallocate_level_crops
Allocate field-available manure to cropland and grassland by crop.allocate_manure_to_land
Spill surplus manure to neighbouring cells with spare capacity.allocate_manure_transport
AMG humification coefficient by carbon input type.amg_h_by_input_type
Animal codes and classificationsanimals_codes
Apply IPCC manure-management losses to the collected manure streams.apply_management_losses
Assert that footprint conservation invariants hold.assert_footprint_invariants
Assert that a Parquet file is structurally sound.assert_parquet_integrity
Assert that a table conforms to a declarative schema.assert_table_schema
Attach a provenance record to a result.attach_provenance
Attach a scope record to a result.attach_scope
Attribute reported fallow land to crops.attribute_fallow_to_crops
Back-cast admin shares across the seambackcast_admin_shares
Balance input-output flows so the footprint conserves.balance_io_flows
Balance a matrix to target margins by RAS.balance_ras
Biomass coefficients for crops and livestock productsbiomass_coefs
Build the gridded agricultural land support.build_ag_land_support
Choose an allocation depth per country and assert no cell is claimed twicebuild_allocation_layer
Build the historical gridded soil-organic-carbon balance.build_carbon_balance
Assemble the per-land-use-class soil carbon inputs.build_carbon_inputs
Build CBS item pricesbuild_cbs_prices
Build the per-cell IPCC climate zone from CRU mean annual temperature.build_cell_climate_zone
Build the IPCC 2019 wet/dry moisture regime of WHEP's crop land.build_cell_moisture_regime
Assemble WHEP's cell-polity crosswalk with true grid-cell area.build_cell_polity
Build commodity balance sheetsbuild_commodity_balances
Build a constant-territory time series for a reference year's boundariesbuild_constant_territory_series
Derive the binding critical-nitrogen threshold per cell.build_critical_n_binding
Build per-crop physical cropland extension.build_crop_land_extension
Build the crop/soil N2O extension.build_crop_soil_n2o_extension
Build per-crop consumptive water from an LPJmL run, one row per band.build_crop_water_consumption
Build per-crop monthly applied irrigation from an LPJmL run.build_crop_water_use
Build a per-crop physical land extension from CROPGRIDS.build_cropgrids_land_extension
Build detailed bilateral trade matrixbuild_detailed_trade
Build the livestock energy-use CO2 footprint extension (meat only).build_energy_co2_extension
Build a per-crop physical land extension with FAO fallow-inclusive arable land.build_fao_arable_fallow_extension
Build livestock feed demand.build_feed_demand
Build local (per-cell) feed intake, chunked by year.build_feed_intake_local
Build per-capita food supply for the nourishment axis.build_food_supply
Compute a footprint end-to-end from an extension table.build_footprint
Build grazable grass availability.build_grass_availability
Build grazable grass availability from an LPJmL run.build_grass_availability_lpjml
Build grassland and natural-land soil carbon inputs from LPJmL.build_grass_natural_carbon_inputs
Classify grassland cells as intensive or extensive through timebuild_grassland_intensity_classes
Build the native grassland land extension.build_grassland_land_extension
Build a grazing-land footprint by forward feed-allocation.build_grazing_feed_footprint
Build gridded landuse datasetbuild_gridded_landuse
Build gridded livestock datasetbuild_gridded_livestock
Build per-cell livestock greenhouse-gas emissions.build_gridded_livestock_emissions
Build a hectare-year (land-occupation) crop land extension.build_hayr_land_extension
Build a pre-1962 land series measured on each year's own bordersbuild_historical_land_areas
Build gridded human-population nitrogen inputs to agriculture.build_human_n build_urban_n
Build the within-country intake dispersion.build_intake_dispersion
Build multi-regional input-output model.build_io_model
Build a consumption land footprint by physical trade balance.build_land_balance_footprint
Split a national crop total across the units of its containerbuild_level_crop_targets
Build the livestock greenhouse-gas emissions extension.build_livestock_ghg_extension
Build livestock nutrient flows from realised feed intake.build_livestock_nutrient_flows
Build the supply-to-intake loss wedge.build_loss_wedge
Summarise gridded nitrogen exceedance to a country-year table.build_n_boundary_country
Build source-exact gridded critical-nitrogen exceedance.build_n_boundary_exceedance
Build the per-capita nitrogen-boundary versus nourishment scatter.build_n_boundary_percapita
Build gridded atmospheric nitrogen deposition inputs.build_n_deposition
Build the embodied-nitrogen footprint extension.build_n_exceedance_extension
Assemble gridded nitrogen inputs from every WHEP N-input source.build_n_inputs
Build the IPCC 2019 wet/dry drivers of the nitrogen loss cascade.build_n_loss_drivers
Build the pathway-mode critical-nitrogen boundary exceedance.build_n_pathway_exceedance
Build country per-capita anthropogenic reactive nitrogen.build_n_percapita
Build the full nitrogen balance: inputs, outputs, losses and NUE.build_nitrogen_balance
Build the SJOS-N nourishment band.build_nourishment_band
Partition each polycell into mutually exclusive land uses.build_polycell_land_uses
Build the polycell spatial support tablebuild_polycell_support
Build primary item pricesbuild_primary_prices
Build primary production datasetbuild_primary_production
Build processing coefficientsbuild_processing_coefs
Build the protein-quality correction for the nourishment band.build_protein_quality
Build the population protein requirement.build_protein_requirement
Score a diet's protein against the age-weighted requirement pattern.build_protein_score
Build the irrigated:rainfed yield ratio per cell, crop and year.build_regime_yield_ratio
Build the bedding straw supply reaching the managed manure chain.build_residue_bedding_supply
Build the embodied-nitrogen trade footprint.build_sjos_n_footprint
Assemble the end-to-end SJOS-N output tables.build_sjos_nitrogen
Assemble soil carbon inputs per cell, crop and year.build_soil_carbon_inputs
Supply and use tablesbuild_supply_use
Build gridded total population from UN WPP and HYDE.build_total_population_grid
Build global trade pricesbuild_trade_prices
Build a gridded soil water balance from LPJmL hydrology.build_water_balance
Estimate total biological nitrogen fixation.calculate_bnf
Calculate cohort and production system distribution.calculate_cohorts_systems
Calculate critical-nitrogen allowances with the Schulte-Uebbing method.calculate_critical_n
Estimate symbiotic biological nitrogen fixation by crop legumes.calculate_crop_bnf
Estimate total crop net primary production.calculate_crop_npp
Estimate cropland NPP components including weeds.calculate_crop_npp_components
Estimate crop above-ground residue biomass.calculate_crop_residues
Estimate crop below-ground (root) biomass.calculate_crop_roots
Calculate enteric methane emissions.calculate_enteric_ch4
Between-country population-weighted Gini of per-capita food supply.calculate_food_gini
Estimate indirect N2O from volatilised ammonia.calculate_indirect_n2o_nh3
Calculate all livestock emissions.calculate_livestock_emissions
Calculate LMDI decomposition.calculate_lmdi
Estimate ammonia-N volatilisation with the MANNER process-based model.calculate_manner_nh3
Estimate ammonia-N volatilisation with MANNER's gross-default technique and incorporation-delay blend.calculate_manner_nh3_default
Calculate manure emissions (CH4 + N2O).calculate_manure_emissions
Estimate nitrate leaching, topsoil denitrification and indirect N2O.calculate_n_leaching
Calculate the gridded soil-surface nitrogen surplus.calculate_n_surplus
Estimate ammonia-N volatilisation from applied nitrogen.calculate_nh3
Estimate non-symbiotic biological nitrogen fixation.calculate_nonsymbiotic_bnf
Partition crop and weed NPP into dry matter, carbon and nitrogen.calculate_npp_carbon_nitrogen
N soil inputs and Nitrogen Use Efficiency (NUE) for cropcalculate_nue_crops
NUE for Livestockcalculate_nue_livestock
Estimate potential net primary production.calculate_potential_npp
Estimate the destinies of crop residues.calculate_residue_destinies
Simulate soil organic carbon with the AMG model.calculate_soc_amg
Simulate soil organic carbon with the Century five-pool model.calculate_soc_century
Simulate soil organic carbon dynamics with a selectable model.calculate_soc_dynamics
Simulate soil organic carbon with the HSOC two-pool model.calculate_soc_hsoc
Simulate soil organic carbon with the ICBM two-pool model.calculate_soc_icbm
Simulate soil organic carbon with the LPJmL two-pool soil model.calculate_soc_lpjml
Simulate soil organic carbon with the RothC five-pool model.calculate_soc_rothc
Estimate direct soil N2O emissions from applied nitrogen.calculate_soil_n2o
System NUEcalculate_system_nue
Calculate uncertainty bounds for livestock emissions.calculate_uncertainty_bounds
Estimate symbiotic biological nitrogen fixation by weeds and cover crops.calculate_weed_bnf
Commodity balance sheet processing fractionscb_processing
CBS to trade item code mappingcbs_trade_codes
FAOSTAT crop to LPJmL crop functional type (CFT) mappingcft_mapping
Check where the arable-land extension changes composition mid-panel.check_arable_composition
Flag implausible year-on-year jumps in a per-unit extentcheck_extent_jumps
Check how much arable land the fallow split attributes to fodder crops.check_fodder_land_share
Check footprint conservation against direct extensions.check_footprint_conservation
Refuse an input that was never suppliedcheck_inputs_supplied
Refuse an aggregate built over an incomplete key latticecheck_keys_complete
Refuse a value vocabulary that no longer contains the labels a filter needscheck_labels_supplied
Check the structural integrity of a Parquet file.check_parquet_integrity
Flag implausible year-on-year jumps in a time series.check_series_jumps
Check the commodity balance sheet supply-use identity.check_supply_use_balance
Check a table against a declarative schema.check_table_schema
Classify crops into the 2-way SJOS-N safe-and-just space.classify_sjos_n
Climate-zone MCF values.climate_mcf
As-published MCF alternatives to climate_mcf.climate_mcf_ipcc
Coello (2025) crop-specific synthetic nitrogen application ratescoello_synthetic_n
Combine independent coefficient-of-variation components.combine_cov
Combine row evidence from several producers.combine_row_evidence
Compare two footprint estimates.compare_footprint_methods
Compute environmental footprints.compute_footprint
Compute land footprints by physical trade balance.compute_footprint_balance
Compute first-use footprint paths.compute_footprint_paths
Compute final-product footprint paths.compute_fp_product_paths
Compute Leontief inverse.compute_leontief_inverse
Compute national trade flows: model vs. raw historical FAO seriescompute_trade_flows_raw
Consolidate a multi-source panel to one winning row per cell.consolidate_sources
Bouwman feed conversion ratios.conv_bouwman
Krausmann per head feed intake.conv_krausmann
Correct HaNi's European deposition trend toward EMEP.correct_n_deposition
Alfredo's typology classificationcreate_alfredos_typologies
Calculate Finn Cycling Index for each province and yearcreate_finn_indicator
Create GRAFS plot dataset.create_grafs_plot_df
GRAFS Nitrogen (N) flows – National Spaincreate_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
Typologies of Juliacreate_typologies_grafs_spain
Typologies of Josettecreate_typologies_of_josette
Create WHEP typologies for Spaincreate_typologies_whep
Eurostat crop classification codescrops_eurostat
Manure nitrogen application by crop and countrycrops_manure_n
Compute the crop-livestock connectivity index per provincedecompose_crop_livestock_conn
Decompose cropland N surplus into size, intensity, and inefficiency driversdecompose_cropland_surplus
Compute the national cropland destiny mix over timedecompose_destiny_mix
Decompose livestock manure management losses into herd, feed, excretion, and management-loss driversdecompose_manure_losses
Decompose semi-natural agroecosystem N surplus into size, intensity, and inefficiency driversdecompose_semi_natural_surplus
Decompose specialization from diversification via the Olley-Pakes allocation covariancedecompose_specialization_cov
Decompose total territorial N losses into compartments and mechanismsdecompose_terr_losses
Decompose territorial N losses by reference period (chained)decompose_terr_losses_periods
Decompose urban nitrogen losses into population, per-capita, and recycling driversdecompose_urban_losses
Decompose a weighted aggregate ratio.decompose_weighted_ratio
Split the pre-1992 aggregate USSR supply into successor states.disaggregate_ussr
Drainage-class bins keyed on annual soil drainage.drainage_ranges
Build a typed zero-row table from a declarative schema.empty_table_from_schema
Complete a table to the admin-shares contractensure_admin_shares
Complete columns from a typed prototype.ensure_columns
Estimate energy demand (Gross Energy) - Tier 2estimate_energy_demand
Estimate livestock nitrogen, carbon and volatile-solids excretion.estimate_n_excretion
Spain's historical export and import series, 1849-1960europe_fao_spain_trade
Report where row evidence disagrees.evidence_conflicts
Carry row evidence through a join or a filter.evidence_for
Expand the interval-keyed polycell support to one row per yearexpand_polycell_years
Trade data sourcesexpand_trade_sources
Feed characteristics by diet quality.feed_characteristics
Feed taxonomy.feed_taxonomy
Fertiliser-type modifying factors for direct soil N2O.fertiliser_n2o_modifiers
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
List the reporting areas whose data is folded into another area codefolded_reporting_areas
Describe the scope of a footprint result.footprint_scope
Local sensitivity of a footprint to each extension.footprint_sensitivity
Physical arable and permanent-crop land base (fallow-inclusive).get_arable_permanent_land
Bilateral trade dataget_bilateral_trade
Get the per-crop physical cropland extension from spatialization inputs.get_crop_land_extension
Livestock feed intakeget_feed_intake
Get WHEP polity geometriesget_polity_geometries
Primary items productionget_primary_production
Crop residue itemsget_primary_residues
Processed products share factorsget_processing_coefs
Retrieve a result's provenance record.get_provenance
Retrieve a result's scope record.get_scope
Assemble monthly SOC climate drivers from CRU climate and LPJmL hydrology.get_soc_climate_drivers
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 for livestock production.gleam_energy_use_ef
Enteric methane conversion factors (IPCC defaults, not GLEAM).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
Derive the lake-and-river fraction of each 0.5-degree cell from GLWDglwd_water_fraction
Accessibility and conversion parameters for grazable grass availability.grass_access_shares
Grazing energy coefficients.grazing_energy_coefs
Build agro-climatic, rainfed-gated fallow allocation weights.gridded_fallow_weights
Harmonize advanced cases with interpolation for 1:N groupsharmonize_interpolate
Harmonize rows labeled "simple" by summing valuesharmonize_simple
Human-population nitrogen rate per urban inhabitant.human_kgn_cap_reference urban_kgn_cap_reference
Human-population nitrogen rate per inhabitant.human_kgn_cap_total_reference
Historical human-population nitrogen applied to agriculture.human_n_reference urban_n_reference
HWSD topsoil USDA texture code to texture-class crosswalk.hwsd_texture_usda
Indirect N2O emission factors.indirect_n2o_ef
Interpolate anchor points at arbitrary output positions.interp_vec
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.16A).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 Tier 1 soil nitrogen emission and leaching factors.ipcc_2019_soil_n_ef
IPCC Ym values.ipcc_2019_ym
IPCC Tier 1 enteric emission factors, as published.ipcc_enteric_ef_tier1
IPCC direct manure N2O emission factors (EF3), by edition.ipcc_manure_ef3
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
Report the expected keys that no row supplieskey_lattice_gaps
Grassland share of synthetic nitrogen by country and yearlassaletta_grassland_share
Livestock unit coefficientsliv_lu_coefs
Livestock physical constants.livestock_constants
Convert IPCC per-animal livestock emissions from kilograms to kilotonnes.livestock_emissions_to_kt
Default production parameters.livestock_production_defaults
Build an LPJmL/WHEP spatial covariate functionmake_lpjml_covariate
Gross-default technique/incorporation-delay blend for MANNER.manner_default_technique_mix
MANNER organic-manure incorporation-delay factor.manner_incorporation_factor
MANNER process-based ammonia-volatilisation factors.manner_params
MANNER synthetic-fertiliser rainfall factor.manner_rain_factor
MANNER synthetic-fertiliser application-rate factor.manner_rate_factor
Inorganic (mineral) nitrogen fraction of excreted manure by species.manure_inorganic_n
Maximum intake shares.max_intake_share
Meisinger and Randall topsoil denitrification share matrix.meisinger_denitrification
Melt a bilateral trade matrix to long format.melt_bilateral_trade
Synthetic nitrogen application rates by crop and countrymueller_synthetic_n
Nitrogen leaching-attenuation and indirect-N2O constants.n_attenuation_constants
Planetary reactive-nitrogen boundary parameters.n_boundary_params
Disaggregated direct soil N2O emission factors by climate and irrigation.n2o_efs_disaggregated
IPCC 2006 Tier 1 direct soil N2O emission factors by climate and irrigation.n2o_efs_ipcc2006
Normalize and classify per-capita nourishment.normalize_nourishment
Nourishment classification levels and colours.nourish_levels
Nourishment protein and energy thresholds.nourishment_thresholds
Plot each compartment's own factor breakdownplot_compart_factor
Plot each compartment's own factor breakdown by period, as one combined panel plotplot_compart_factor_periods
Plot each compartment's own factor breakdown, rolling meanplot_compart_factor_roll
Plot each compartment's own factor breakdown, rolling mean, as one combined panel plotplot_compart_factor_roll_panel
Plot each compartment's own factor breakdown, year-on-year (non-cumulative)plot_compart_factor_yearly
Plot the crop-livestock connectivity indexplot_crop_livestock_conn
Plot the cropland destiny mix over timeplot_destiny_mix
Plot Finn Cycling Index evolution and period comparisonplot_finn_circularity
Interactive footprint Sankey viewerplot_footprint_sankey
Plot national nitrogen inputs, production, and surplus for a land system.plot_input_output
Plot national nitrogen inputs, production, and surplus for livestock.plot_input_output_livestock
Plot national nitrogen inputs and uses for the full agro-food system.plot_input_output_system
Plot cumulative drivers of the change in territorial N lossesplot_loss_decomp
Plot period-based drivers of the change in territorial N lossesplot_loss_decomp_periods
Plot period-based drivers of territorial N losses, as one combined panel plotplot_loss_decomp_periods_panel
Plot rolling-mean year-on-year drivers of the change in territorial N lossesplot_loss_decomp_rolling
Plot rolling-mean year-on-year drivers of territorial N losses, as one combined panel plotplot_loss_decomp_rolling_panel
Plot year-on-year (non-cumulative) drivers of the change in territorial N lossesplot_loss_decomp_yearly
Plot national trade flows: model vs. raw historical FAO seriesplot_national_trade_flows_raw
Plot national net trade validationplot_national_trade_validation
Plot the specialization-vs-diversification allocation covarianceplot_specialization_cov
Plot four N indicators as time series per typologyplot_typology_indicators_panel
Plot four N indicators as period comparisons per typologyplot_typology_periods_panel
Politiespolities
Polity categories and regional classificationspolities_cats
Find back-cast rows whose polity label and growth proxy describe different territoriespolity_anchor_drift
FAOSTAT/FABIO area-to-polity crosswalkpolity_area_crosswalk
Report reporting buckets that sum more than one territorypolity_bucket_coverage
Polity containment edgespolity_containment
Find rows attributed to a polity not live in the row's yearpolity_coverage_gaps
Which territorial identity WHEP's year-less objects carrypolity_identity_conventions
Source label to polity aliasespolity_label_aliases
Source label corrections scoped to one itempolity_label_item_corrections
Report which authority a row's territorial identity rests onpolity_mapping_provenance
A minimal polity geometry table for examples and smoke testspolycell_example_geometries
Report which areas a present-day-ISO3 population source can reach.population_source_reach
Prepare production data for livestock emission calculations.prepare_livestock_emissions
Items with double-counting in production statisticsprimary_double
Propagate input uncertainty through a footprint.propagate_fp_uncertainty
Read the per-family subnational admin-statistics pinsread_admin_family
Read the assembled subnational admin-shares pinread_admin_shares
Read Eurostat regional crop and livestock statisticsread_admin_stats_eurostat
Read United States state or county agricultural statistics from NASSread_admin_stats_nass
Read Brazilian state agricultural statistics from IBGE SIDRAread_admin_stats_sidra
Read a Schulte-Uebbing gridded critical-nitrogen layer.read_critical_n
Read a CRU TS 4.09 monthly climate variable into a tidy tibble.read_cru_climate
Read EMEP MSC-W atmospheric nitrogen deposition onto WHEP's grid.read_emep_deposition
Read FAOSTAT Food Balance Sheet population on WHEP area codes.read_fbs_population
Read the Natural Earth glaciated-areas ice layerread_glaciated_areas
Read GLW3 gridded livestock counts on WHEP's 0.5-degree gridread_glw_density
Read the GLWD inland-water fraction on the 0.5-degree gridread_glwd_water
Read FAOSTAT's coefficient of variation of habitual caloric consumption.read_habitual_cv
Read observed topsoil organic carbon from HWSD onto WHEP's grid.read_hwsd_topsoil_soc
Read gridded HYDE population onto WHEP's grid.read_hyde_population
Read the cell-to-polity country grid at a containment depthread_level_country_grid
Read monthly cropland soil cover from an LPJmL run's crop calendar.read_lpjml_crop_cover
Read natural-grass productivity from an LPJmL run.read_lpjml_grass_productivity
Read an LPJmL hydrology variable into a tidy tibble.read_lpjml_hydrology
Read litterfall by land-use class from an LPJmL run.read_lpjml_litterfall
Read natural-land soil cover from an LPJmL run.read_lpjml_natural_cover
Read a per-PFT annual LPJmL carbon variable into a tidy tibble.read_lpjml_npp
Read LPJmL irrigated and rainfed crop yields per cell.read_lpjml_regime_yield
Read gridded LPJmL-forcing windspeed onto WHEP's grid.read_lpjml_wind
Read gridded yearly LUH2 land-use-class fractions and areas.read_luh2_landuse
Read the LUH2 terrestrial-area validation layerread_luh2_terrestrial
Read a HaNi atmospheric nitrogen deposition species onto WHEP's grid.read_n_deposition
Read the polycell support table from its registered pinread_polycell_support
Read national population on WHEP area codes.read_population
Read gridded soil hydraulic properties from HWSD onto WHEP's grid.read_soil_hydraulic
Read gridded soil pH onto WHEP's grid.read_soil_ph
Read SPAM harvested area, production and yield by crop and technology.read_spam_yields
Read UN World Population Prospects population.read_wpp_population
Reconcile a level allocation against the national totals that bindreconcile_admin_allocation
Record provenance for a reproducible result.record_provenance
Redistribute available feed supply among livestock demand.redistribute_feed
Crop sources for the irrigated:rainfed regime yield ratioregime_yield_crop_mapping
Regional MMS distribution.regional_mms_distribution
Full polity and region reference tableregions_full
Humification fraction by carbon input type.residue_humification
Resolve one source per container from the admin-shares tableresolve_admin_shares
Resolve source-native admin identifiers to polity codesresolve_admin_units
Resolve a source's country label to a polityresolve_polity_label
Resolve a national row onto the polity its grid support carries that yearresolve_polity_lineage
Produce row-level evidence for a table.row_evidence
The declarative schema of a row-evidence table.row_evidence_schema
Report which Rest-of-World members report under their own territoryrow_promotion_status
Run the gridded land-use spatialization pipelinerun_spatialize
Run one-at-a-time sensitivity analysis on typology thresholds.run_typology_sensitivity
Gate an admin-shares back-cast at its seamsseam_gate
Tolerances of the admin-shares seam gateseam_gate_tolerances
Safe-and-just nitrogen classification levels and colours.sjos_levels
Smil (2001) global synthetic nitrogen production, 1913-2000smil_2001_synthetic_n_global
Assign each crop to its soil-carbon crop group.soc_crop_group
Compute the AMG (AMGv2) annual climate rate modifier.soc_rate_modifier_amg
Compute the Century DEFAC annual climate rate modifier.soc_rate_modifier_century
Compute the ICBM annual climate rate modifier.soc_rate_modifier_icbm
Compute the LPJmL annual decomposition response.soc_rate_modifier_lpjml
Compute the RothC and HSOC annual climate rate modifier.soc_rate_modifier_rothc
Generic land-use soil-cover curve for the RothC/HSOC cover factor.soc_soil_cover_curve
Soil organic carbon turnover parameters by model.soc_turnover_params
Soil carbon-to-nitrogen ratios for organic-matter balances.soil_cn_ratios
Soil hydraulic properties by USDA texture class.soil_hydraulic_by_texture
Soil organic matter content bins.som_ranges
Spatialize a polity-level nitrogen total to crops and grid cells.spatialize_country_n_to_crops
Split livestock excretion across manure-management systems.split_manure_management
Split a cell-crop's production between its rainfed and irrigated regimes.split_regime_yield
Record which optional inputs a build consumedstamp_inputs_supplied
Subsoil nitrate reduction shares by source, climate and irrigation.subsoil_no3_reduction
Summarise a footprint conservation report.summarise_conservation
Summarise biological nitrogen fixation results.summarize_bnf
Temperature adjustment factors for NEm.temperature_adjustment
Uncertainty ranges for emission parameters.uncertainty_ranges
The cropland each unit holds, on the basis the capacity ceiling usesunit_cropland_extent
Validate national net trade balancevalidate_national_trade
Validate national net trade against raw historical FAO seriesvalidate_national_trade_raw
Clear the build pipeline cachewhep_clear_cache
Read a WHEP coefficient table.whep_coef_table
External inputswhep_inputs
Input file versionswhep_list_file_versions
Download, cache and read fileswhep_read_file
Read a registry of pinned input fileswhep_registry
Write a Parquet file and verify it before returning.write_parquet_checked
Write a table to disk safely and verifiably.write_table_checked