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
)Numeric vector. Crop yield (kg/ha).
Numeric vector. Total water consumed (mm).
Numeric vector. Total energy input (MJ/ha).
Numeric vector. Total energy output (MJ/ha).
Numeric vector. Nitrogen applied (kg/ha).
Numeric vector. Nitrogen total uptake (kg/ha).
Numeric vector. Total GHG emission (kg CO2-eq/ha).
Character vector. Treatment labels.
Default NULL.
Numeric vector of length 5. Dimension weights. Default equal weights.
Logical. If TRUE, prints informational messages.
Default TRUE.
A data frame with one row per treatment and columns:
Character. Treatment name
Numeric. Crop yield
Numeric. Water use efficiency
Numeric. Energy use efficiency ratio
Numeric. Energy return on investment
Numeric. Net energy balance
Numeric. Partial factor productivity of N
Numeric. Carbon efficiency
Numeric. Carbon intensity
Numeric. Normalized water score
Numeric. Normalized energy score
Numeric. Normalized food score
Numeric. Normalized nutrient score
Numeric. Normalized carbon score
Numeric. Composite nexus index
# \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
# }