Skip to contents

Synthesizes pre-computed climasus model objects into a Strengths, Weaknesses, Opportunities, and Threats (SWOT) framework for climate-health risk communication and territorial planning. Each quadrant aggregates normalized indicators (0–100 scale) extracted from the supplied model objects; quadrant scores are returned both as continuous values and as user-defined categorical labels.

Usage

sus_mod_swot(
  vulnerability = NULL,
  af = NULL,
  burden = NULL,
  dlnm = NULL,
  sensitivity = NULL,
  score_type = c("both", "numeric", "categorical"),
  breaks = c(33, 66),
  labels = NULL,
  city_col = "city",
  lang = c("pt", "en", "es"),
  verbose = TRUE
)

Arguments

vulnerability

A climasus_vi object from sus_mod_vulnerability_index(), or NULL. Provides per-city VI scores, exposure, sensitivity, and adaptive capacity indicators.

af

A climasus_af object from sus_mod_af(), or NULL. Provides total, heat, and cold attributable fraction percentages.

burden

A climasus_burden object from sus_mod_burden(), or NULL. Provides city-level ranked attributable numbers and fractions.

dlnm

A climasus_dlnm object from sus_mod_dlnm(), or NULL. Provides the heat exposure-response RR at the 95th percentile of temperature.

sensitivity

A climasus_sensitivity object from sus_mod_sensitivity(), or NULL. Provides stratum-level RR inequality and the maximum hot RR across strata.

score_type

Character. Which score types to compute: "numeric" (0–100), "categorical" (cut-point labels), or "both" (default).

breaks

Numeric vector. Strictly increasing cut-points in (0, 100) used to convert numeric scores into categories. Default c(33, 66) produces three categories. Generates length(breaks) + 1 categories.

labels

Character vector or NULL. Category labels with length length(breaks) + 1. NULL (default) uses language-appropriate defaults: Portuguese c("Baixo", "Médio", "Alto"), English c("Low", "Medium", "High"), Spanish c("Bajo", "Medio", "Alto").

city_col

Character. Column name of the city/entity identifier in the vulnerability$vi_table. Defaults to "city". Overridden by vulnerability$meta$city_col when available.

lang

Character. Language for labels: "pt" (default), "en", "es".

verbose

Logical. Print progress messages. Default TRUE.

Value

A climasus_swot list with:

$scores

Tibble. One row per entity with: entity, S_score, W_score, O_score, T_score (numeric 0–100, NA when no indicators are available for a quadrant), n_S, n_W, n_O, n_T (indicator counts). When score_type \(\in\) c("categorical","both"): S_cat, W_cat, O_cat, T_cat.

$indicators

Tibble (long). One row per (entity \(\times\) quadrant \(\times\) indicator): entity, quadrant, ind_code, indicator, raw_value, norm_score, direction ("positive" or "negative").

$meta

List: n_entities, n_indicators, inputs_used, score_type, breaks, labels, lang, call_time.

SWOT Quadrant Indicators

QuadrantMeaningIndicators from each input
S StrengthsCurrent protective factorsadaptive_capacity_score (VI), low total AF% (af/burden), low burden rank
W WeaknessesCurrent vulnerabilitiessensitivity_score (VI), heat/cold AF% (af), stratum RR inequality (sensitivity)
O OpportunitiesIntervention windowsLow VI percentile (VI), low current exposure (VI)
T ThreatsClimate-health risksexposure_score + vi_score (VI), heat RR at P95 (dlnm), attributable number (burden), max stratum RR (sensitivity)

All indicators are normalized to 0–100 within the supplied data. For Strength and Opportunity indicators the raw value is already oriented so that higher = better; for Weakness and Threat indicators, higher means worse. The quadrant score is the mean of available indicator scores.

When vulnerability and/or burden provide multi-city data, the SWOT is computed per city. Single-city inputs (af, dlnm, sensitivity) are broadcast to all detected entities and treated as shared context.

Examples

if (FALSE) { # \dontrun{
swot <- sus_mod_swot(
  vulnerability = vi_result,
  af            = af_result,
  burden        = burden_result,
  dlnm          = dlnm_result,
  score_type    = "both",
  lang          = "pt"
)

swot$scores
sus_mod_plot_swot(swot, type = "matrix", lang = "pt")
sus_mod_plot_swot(swot, type = "radar",  lang = "en")
} # }