
Run the Climate Priority Area (CPA) Approach
Source:R/utils-climate.R
splnr_climate_priorityAreaApproach.Rdsplnr_climate_priorityAreaApproach() implements the Climate Priority Area
approach by splitting conservation features into climate-smart (CS) and
non-climate-smart (NCS) components and adjusting their targets accordingly.
Usage
splnr_climate_priorityAreaApproach(
features,
metric,
targets,
direction,
percentile = 5,
refugiaTarget = 1
)Arguments
- features
An
sfobject of conservation features (binary presence/absence).- metric
An
sfobject with a column namedmetric.- targets
A
data.framewith columnsfeatureandtarget.- direction
1(higher = more climate-smart) or-1(lower = more climate-smart).- percentile
Numeric (0-100). Defaults to
5.- refugiaTarget
Numeric (0-1). Defaults to
1.
Value
A list with:
Features:sfobject with_CSand_NCScolumns per feature.Targets:data.framewith adjusted targets.
Details
This function orchestrates two steps:
Preprocessing via
splnr_climate_priorityArea_preprocess().Target Assignment via
splnr_climate_priorityArea_assignTargets().
Examples
if (FALSE) { # \dontrun{
initial_targets <- dat_species_bin %>%
sf::st_drop_geometry() %>%
colnames() %>%
data.frame() %>%
setNames(c("feature")) %>%
dplyr::mutate(target = 0.3)
CPA_result <- splnr_climate_priorityAreaApproach(
features = dat_species_bin,
metric = dat_clim,
targets = initial_targets,
direction = -1,
percentile = 5,
refugiaTarget = 1
)
out_sf_cpa <- CPA_result$Features
targets_cpa <- CPA_result$Targets
} # }