Generates a comprehensive one-call nexus analysis from raw agronomic field data, computing all dimension metrics, normalizing, and producing the composite index.

nexus_summary(
  yield,
  water_consumed,
  energy_input,
  energy_output,
  n_applied,
  n_uptake,
  carbon_emission,
  treatment_names = NULL,
  weights = rep(0.2, 5),
  verbose = TRUE
)

Arguments

yield

Numeric vector. Crop yield (kg/ha).

water_consumed

Numeric vector. Total water consumed (mm).

energy_input

Numeric vector. Total energy input (MJ/ha).

energy_output

Numeric vector. Total energy output (MJ/ha).

n_applied

Numeric vector. Nitrogen applied (kg/ha).

n_uptake

Numeric vector. Nitrogen total uptake (kg/ha).

carbon_emission

Numeric vector. Total GHG emission (kg CO2-eq/ha).

treatment_names

Character vector. Treatment labels. Default NULL.

weights

Numeric vector of length 5. Dimension weights. Default equal weights.

verbose

Logical. If TRUE, prints informational messages. Default TRUE.

Value

A data frame with one row per treatment and columns:

treatment

Character. Treatment name

yield_kg_ha

Numeric. Crop yield

WUE_kg_mm

Numeric. Water use efficiency

EUE_ratio

Numeric. Energy use efficiency ratio

EROI

Numeric. Energy return on investment

net_energy_MJ

Numeric. Net energy balance

PFP_kg_kgN

Numeric. Partial factor productivity of N

carbon_eff

Numeric. Carbon efficiency

carbon_intensity

Numeric. Carbon intensity

W_score

Numeric. Normalized water score

E_score

Numeric. Normalized energy score

F_score

Numeric. Normalized food score

N_score

Numeric. Normalized nutrient score

C_score

Numeric. Normalized carbon score

nexus_index

Numeric. Composite nexus index

Examples

# \donttest{
nexus_summary(
  yield = c(4500, 4200, 3800),
  water_consumed = c(450, 400, 350),
  energy_input = c(12000, 11000, 9500),
  energy_output = c(135000, 125000, 112000),
  n_applied = c(120, 120, 120),
  n_uptake = c(100, 90, 80),
  carbon_emission = c(2500, 2200, 1800),
  treatment_names = c("CA+Drip", "CT+Sprinkler", "ZT+Rainfed")
)
#> Nexus summary computed for 3 treatments.
#> WEFNC Nexus Analysis Results
#> ---------------------------------------- 
#> Treatments: 3 
#> Nexus Index range: 0.4 - 0.6 
#> Best performer: ZT+Rainfed 
#> 
#>     treatment yield_kg_ha WUE_kg_mm EUE_ratio  EROI net_energy_MJ PFP_kg_kgN
#>       CA+Drip        4500   10.0000     11.25 11.25        123000      37.50
#>  CT+Sprinkler        4200   10.5000     11.36 11.36        114000      35.00
#>    ZT+Rainfed        3800   10.8571     11.79 11.79        102500      31.67
#>  carbon_eff carbon_intensity W_score E_score F_score N_score C_score
#>      1.8000           0.5556  0.0000  0.0000  1.0000  1.0000  0.0000
#>      1.9091           0.5238  0.5834  0.2037  0.5714  0.5712  0.4286
#>      2.1111           0.4737  1.0000  1.0000  0.0000  0.0000  1.0000
#>  nexus_index
#>       0.4000
#>       0.4717
#>       0.6000

# }