Skip to contents

This function calculates the state indicator ~ pressures ~ type specific vulnerability, from exposure scores and sensitivity scores. The function can either be used with the output from calc_exposure or model_exposure and calc_sensitivity or model_sensitivity.

Usage

vulnerability(
  exposure_results,
  sensitivity_results,
  method_vulnerability = "mean",
  method_uncertainty = "mean"
)

Arguments

exposure_results

a data frame containing the output from calc_exposure or model_exposure.

sensitivity_results

a data frame containing the output from calc_sensitivity or model_sensitivity.

method_vulnerability

a character string specifying the method for aggregating the trait based vulnerabilities, available are mean (default), median, maximum, and minimum.

method_uncertainty

a character string specifying the method for the aggregation of the uncertainty scores from exposure and sensitivity. Available are mean (default), median, maximum, and minimum.

Value

a data frame containing state indicator, pressure, type and the vulnerability and associated uncertainty score.

Details

For expert scores the following equation is applied

  • (sensitivity + adaptive capacity) + exposure,

or in case of negative sensitivity values:

  • (sensitivity + adaptive capacity) - exposure.

Trait based sensitivity and adaptive capacity scores will be assessed individually and then aggregated to one vulnerability score per state indicator and pressure combination. The aggregation method can be chosen with the method_vulnerability argument. For modelling scores sensitivity and exposure scores are summed up. If the exposure trend and the sensitivity score have the same direction, e.g. a decreasing trend in exposure and a negative sensitivity score, then the vulnerability effect is assigned as positive. If they have opposing directions, e.g. an increasing exposure, while sensitivity is negative, then the vulnerability is negative. Vulnerability scores can range only from -10 to 10, aligning with the ecorisk framework.

Examples

# Using demo output data from the calc_exposure() and calc_sensitivity()
# functions:
vulnerability(
  exposure_results = ex_output_calc_exposure,
  sensitivity_results = ex_output_calc_sensitivity
)
#>        indicator    pressure            type pathway vulnerability uncertainty
#> 1  phytoplankton temperature          direct  expert       -4.7500    1.333333
#> 2  phytoplankton    salinity          direct  expert        0.0000    2.000000
#> 3  phytoplankton      oxygen          direct  expert       -2.2500    2.166667
#> 4  phytoplankton    nutrient          direct  expert       -4.2500    2.000000
#> 5  phytoplankton     fishing          direct  expert        0.0000    1.250000
#> 6  phytoplankton temperature direct_indirect  expert       -5.7500    1.333333
#> 7  phytoplankton    salinity direct_indirect  expert        0.0000    2.000000
#> 8  phytoplankton      oxygen direct_indirect  expert       -3.2500    2.166667
#> 9  phytoplankton    nutrient direct_indirect  expert       -5.2500    2.000000
#> 10 phytoplankton     fishing direct_indirect  expert        0.0000    1.250000
#> 11       herring temperature          direct  expert       -3.5625    1.333333
#> 12       herring    salinity          direct  expert       -2.1250    1.333333
#> 13       herring      oxygen          direct  expert       -2.4375    2.166667
#> 14       herring    nutrient          direct  expert        1.3125    2.000000
#> 15       herring     fishing          direct  expert       -4.5000    1.250000
#> 16       herring temperature direct_indirect  expert       -7.0000    1.333333
#> 17       herring    salinity direct_indirect  expert       -3.6875    1.333333
#> 18       herring      oxygen direct_indirect  expert       -4.5000    2.166667
#> 19       herring    nutrient direct_indirect  expert        3.9375    2.000000
#> 20       herring     fishing direct_indirect  expert       -6.2500    1.250000
#> 21           cod temperature          direct  expert       -5.0625    1.333333
#> 22           cod    salinity          direct  expert       -3.1250    1.333333
#> 23           cod      oxygen          direct  expert       -4.1875    2.166667
#> 24           cod    nutrient          direct  expert       -1.0625    2.000000
#> 25           cod     fishing          direct  expert       -6.7500    1.250000
#> 26           cod temperature direct_indirect  expert       -7.5000    1.333333
#> 27           cod    salinity direct_indirect  expert       -6.0000    1.333333
#> 28           cod      oxygen direct_indirect  expert       -5.7500    2.166667
#> 29           cod    nutrient direct_indirect  expert       -3.0000    2.000000
#> 30           cod     fishing direct_indirect  expert       -8.7500    1.250000
#> 31      seabirds temperature          direct  expert       -3.7500    1.666667
#> 32      seabirds    salinity          direct  expert        0.0000    2.333333
#> 33      seabirds      oxygen          direct  expert        0.0000    2.500000
#> 34      seabirds    nutrient          direct  expert        0.0000    2.333333
#> 35      seabirds     fishing          direct  expert       -8.0000    1.916667
#> 36      seabirds temperature direct_indirect  expert       -6.7500    1.666667
#> 37      seabirds    salinity direct_indirect  expert       -4.2500    2.333333
#> 38      seabirds      oxygen direct_indirect  expert       -3.2500    2.500000
#> 39      seabirds    nutrient direct_indirect  expert       -4.2500    2.333333
#> 40      seabirds     fishing direct_indirect  expert       -9.0000    1.916667

# \donttest{
  ### Demo Expert-Based Pathway
  # - using the example scoring datasets 'ex_expert_exposure',
  #   and 'ex_expert_sensitivity'

  # Calculate (mean) exposure score:
  exp_expert <- calc_exposure(
    pressures = ex_expert_exposure$pressure,
    components = ex_expert_exposure[ ,2:5],
    uncertainty = ex_expert_exposure[ ,6:9],
    method = "mean" # default
  )
  # Calculate (mean) sensitivity (and adaptive capacity) score:
  sens_ac_expert <- calc_sensitivity(
    indicators = ex_expert_sensitivity$indicator,
    pressures = ex_expert_sensitivity$pressure,
    type = ex_expert_sensitivity$type,
    sensitivity_traits = ex_expert_sensitivity[ ,4:8],
    adaptive_capacities = ex_expert_sensitivity[ ,9:13],
    uncertainty_sens = ex_expert_sensitivity[ ,14:18],
    uncertainty_ac = ex_expert_sensitivity[ ,19:23],
    method = "mean"
  )
  # Calculate vulnerability using the mean (default):
  vulnerability(
    exposure_results = exp_expert,
    sensitivity_results = sens_ac_expert
  )
#>        indicator    pressure            type pathway vulnerability uncertainty
#> 1  phytoplankton temperature          direct  expert       -4.7500    1.333333
#> 2  phytoplankton    salinity          direct  expert        0.0000    2.000000
#> 3  phytoplankton      oxygen          direct  expert       -2.2500    2.166667
#> 4  phytoplankton    nutrient          direct  expert       -4.2500    2.000000
#> 5  phytoplankton     fishing          direct  expert        0.0000    1.250000
#> 6  phytoplankton temperature direct_indirect  expert       -5.7500    1.333333
#> 7  phytoplankton    salinity direct_indirect  expert        0.0000    2.000000
#> 8  phytoplankton      oxygen direct_indirect  expert       -3.2500    2.166667
#> 9  phytoplankton    nutrient direct_indirect  expert       -5.2500    2.000000
#> 10 phytoplankton     fishing direct_indirect  expert        0.0000    1.250000
#> 11       herring temperature          direct  expert       -3.5625    1.333333
#> 12       herring    salinity          direct  expert       -2.1250    1.333333
#> 13       herring      oxygen          direct  expert       -2.4375    2.166667
#> 14       herring    nutrient          direct  expert        1.3125    2.000000
#> 15       herring     fishing          direct  expert       -4.5000    1.250000
#> 16       herring temperature direct_indirect  expert       -7.0000    1.333333
#> 17       herring    salinity direct_indirect  expert       -3.6875    1.333333
#> 18       herring      oxygen direct_indirect  expert       -4.5000    2.166667
#> 19       herring    nutrient direct_indirect  expert        3.9375    2.000000
#> 20       herring     fishing direct_indirect  expert       -6.2500    1.250000
#> 21           cod temperature          direct  expert       -5.0625    1.333333
#> 22           cod    salinity          direct  expert       -3.1250    1.333333
#> 23           cod      oxygen          direct  expert       -4.1875    2.166667
#> 24           cod    nutrient          direct  expert       -1.0625    2.000000
#> 25           cod     fishing          direct  expert       -6.7500    1.250000
#> 26           cod temperature direct_indirect  expert       -7.5000    1.333333
#> 27           cod    salinity direct_indirect  expert       -6.0000    1.333333
#> 28           cod      oxygen direct_indirect  expert       -5.7500    2.166667
#> 29           cod    nutrient direct_indirect  expert       -3.0000    2.000000
#> 30           cod     fishing direct_indirect  expert       -8.7500    1.250000
#> 31      seabirds temperature          direct  expert       -3.7500    1.666667
#> 32      seabirds    salinity          direct  expert        0.0000    2.333333
#> 33      seabirds      oxygen          direct  expert        0.0000    2.500000
#> 34      seabirds    nutrient          direct  expert        0.0000    2.333333
#> 35      seabirds     fishing          direct  expert       -8.0000    1.916667
#> 36      seabirds temperature direct_indirect  expert       -6.7500    1.666667
#> 37      seabirds    salinity direct_indirect  expert       -4.2500    2.333333
#> 38      seabirds      oxygen direct_indirect  expert       -3.2500    2.500000
#> 39      seabirds    nutrient direct_indirect  expert       -4.2500    2.333333
#> 40      seabirds     fishing direct_indirect  expert       -9.0000    1.916667
  # Calculate vulnerability using the median and maximum:
  vulnerability(
    exposure_results = exp_expert,
    sensitivity_results = sens_ac_expert,
    method_vulnerability = "median",
    method_uncertainty = "maximum"
  )
#>        indicator    pressure            type pathway vulnerability uncertainty
#> 1  phytoplankton temperature          direct  expert        -4.750        2.00
#> 2  phytoplankton    salinity          direct  expert         0.000        2.00
#> 3  phytoplankton      oxygen          direct  expert        -2.250        2.50
#> 4  phytoplankton    nutrient          direct  expert        -4.250        2.00
#> 5  phytoplankton     fishing          direct  expert         0.000        1.75
#> 6  phytoplankton temperature direct_indirect  expert        -5.750        2.00
#> 7  phytoplankton    salinity direct_indirect  expert         0.000        2.00
#> 8  phytoplankton      oxygen direct_indirect  expert        -3.250        2.50
#> 9  phytoplankton    nutrient direct_indirect  expert        -5.250        2.00
#> 10 phytoplankton     fishing direct_indirect  expert         0.000        1.75
#> 11       herring temperature          direct  expert        -4.250        2.00
#> 12       herring    salinity          direct  expert        -2.125        2.00
#> 13       herring      oxygen          direct  expert        -2.750        2.50
#> 14       herring    nutrient          direct  expert         0.000        2.00
#> 15       herring     fishing          direct  expert        -4.500        1.75
#> 16       herring temperature direct_indirect  expert        -6.750        2.00
#> 17       herring    salinity direct_indirect  expert        -4.750        2.00
#> 18       herring      oxygen direct_indirect  expert        -4.250        2.50
#> 19       herring    nutrient direct_indirect  expert         4.750        2.00
#> 20       herring     fishing direct_indirect  expert        -8.000        1.75
#> 21           cod temperature          direct  expert        -6.250        2.00
#> 22           cod    salinity          direct  expert        -3.125        2.00
#> 23           cod      oxygen          direct  expert        -5.250        2.50
#> 24           cod    nutrient          direct  expert         0.000        2.00
#> 25           cod     fishing          direct  expert        -9.000        1.75
#> 26           cod temperature direct_indirect  expert        -7.750        2.00
#> 27           cod    salinity direct_indirect  expert        -6.250        2.00
#> 28           cod      oxygen direct_indirect  expert        -5.750        2.50
#> 29           cod    nutrient direct_indirect  expert        -2.750        2.00
#> 30           cod     fishing direct_indirect  expert        -9.000        1.75
#> 31      seabirds temperature          direct  expert        -3.750        2.00
#> 32      seabirds    salinity          direct  expert         0.000        3.00
#> 33      seabirds      oxygen          direct  expert         0.000        3.00
#> 34      seabirds    nutrient          direct  expert         0.000        3.00
#> 35      seabirds     fishing          direct  expert        -8.000        3.00
#> 36      seabirds temperature direct_indirect  expert        -6.750        2.00
#> 37      seabirds    salinity direct_indirect  expert        -4.250        3.00
#> 38      seabirds      oxygen direct_indirect  expert        -3.250        3.00
#> 39      seabirds    nutrient direct_indirect  expert        -4.250        3.00
#> 40      seabirds     fishing direct_indirect  expert        -9.000        3.00


  ### Demo Model-Based Pathway
  # - using the demo time series 'pressure_ts_baltic' and 'indicator_ts_baltic'

  # Model exposure score:
  exp_model <- model_exposure(
    pressure_time_series = pressure_ts_baltic,
    base_years = c(start = 1984, end = 1994),
    current_years = c(start = 2010, end = 2016)
  )

  # Model sensitivity score:
  sens_ac_model <- model_sensitivity(
    indicator_time_series = indicator_ts_baltic,
    pressure_time_series = pressure_ts_baltic,
    current_years = c(start = 2010, end = 2016)
  )
#> Please review the model diagnostics of the GAMs applied in the time series based sensitivity scoring using the function plot_diagnostic_sensitivity(). Remove models with unacceptable diagnostics from the output table of this function.
  # Add manually adaptive capacity scores (otherwise zero):
  sens_ac_model$adaptive_capacity <- c(rep(1, 8), rep(-1, 8))

  # Calculate vulnerability using the mean (default):
  vulnerability(
    exposure_results = exp_model,
    sensitivity_results = sens_ac_model
  )
#>                indicator      pressure            type pathway vulnerability
#> 1  zooplankton_mean_size      nitrogen direct_indirect   model          7.50
#> 2  zooplankton_mean_size   phosphorous direct_indirect   model          0.00
#> 3  zooplankton_mean_size surf_temp_sum direct_indirect   model          0.00
#> 4  zooplankton_mean_size  bot_temp_ann direct_indirect   model          0.00
#> 5  zooplankton_mean_size  surf_sal_sum direct_indirect   model          3.25
#> 6  zooplankton_mean_size   bot_sal_ann direct_indirect   model          3.25
#> 7  zooplankton_mean_size   bot_oxy_ann direct_indirect   model          0.00
#> 8  zooplankton_mean_size   fishing_cod direct_indirect   model          0.00
#> 9     eastern_baltic_cod      nitrogen direct_indirect   model         -5.50
#> 10    eastern_baltic_cod   phosphorous direct_indirect   model          0.00
#> 11    eastern_baltic_cod surf_temp_sum direct_indirect   model         -5.00
#> 12    eastern_baltic_cod  bot_temp_ann direct_indirect   model         -7.00
#> 13    eastern_baltic_cod  surf_sal_sum direct_indirect   model         -5.25
#> 14    eastern_baltic_cod   bot_sal_ann direct_indirect   model          0.00
#> 15    eastern_baltic_cod   bot_oxy_ann direct_indirect   model          3.50
#> 16    eastern_baltic_cod   fishing_cod direct_indirect   model         -5.25
#>    uncertainty
#> 1          2.0
#> 2          1.5
#> 3          1.5
#> 4          1.5
#> 5          2.0
#> 6          2.0
#> 7          1.5
#> 8          2.0
#> 9          2.0
#> 10         1.5
#> 11         1.5
#> 12         1.5
#> 13         2.0
#> 14         2.0
#> 15         1.5
#> 16         2.0

# }