Comprehensive sustainability score with categorization based on user-defined thresholds.

nexus_sustainability_score(
  water_score,
  energy_score,
  food_score,
  nutrient_score,
  carbon_score,
  weights = rep(0.2, 5),
  thresholds = c(0.4, 0.6, 0.8),
  verbose = TRUE
)

Arguments

water_score

Numeric vector. Water dimension score (0 to 1).

energy_score

Numeric vector. Energy dimension score (0 to 1).

food_score

Numeric vector. Food dimension score (0 to 1).

nutrient_score

Numeric vector. Nutrient dimension score (0 to 1).

carbon_score

Numeric vector. Carbon dimension score (0 to 1).

weights

Numeric vector of length 5. Default equal weights.

thresholds

Numeric vector of length 3. Breakpoints for sustainability categories: c(low, medium, high). Default c(0.4, 0.6, 0.8).

verbose

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

Value

A data frame with columns:

nexus_score

Numeric. Composite sustainability score (0 to 1)

category

Character. Sustainability category: Unsustainable, Low Sustainability, Moderately Sustainable, or Highly Sustainable

water

Numeric. Water dimension input score

energy

Numeric. Energy dimension input score

food

Numeric. Food dimension input score

nutrient

Numeric. Nutrient dimension input score

carbon

Numeric. Carbon dimension input score

Details

Formula: $$NSS = \frac{1}{n} \sum_{i=1}^{n} S_i$$ where S_i are normalized sub-dimension scores.

Examples

# \donttest{
nexus_sustainability_score(
  water_score = c(0.85, 0.60, 0.45),
  energy_score = c(0.70, 0.55, 0.35),
  food_score = c(0.90, 0.80, 0.50),
  nutrient_score = c(0.65, 0.70, 0.40),
  carbon_score = c(0.80, 0.50, 0.30)
)
#> Sustainability scores with categories computed.
#> WEFNC Sustainability Assessment
#> ---------------------------------------- 
#>   Score: 0.7800 -> Moderately Sustainable
#>   Score: 0.6300 -> Moderately Sustainable
#>   Score: 0.4000 -> Low Sustainability
#> 
#>  nexus_score               category water energy food nutrient carbon
#>         0.78 Moderately Sustainable  0.85   0.70  0.9     0.65    0.8
#>         0.63 Moderately Sustainable  0.60   0.55  0.8     0.70    0.5
#>         0.40     Low Sustainability  0.45   0.35  0.5     0.40    0.3

# }