![](../logo.png)
Function to run the percentile approach
Source:R/utils-climate.R
splnr_climate_percentileApproach.Rd
Function to run the percentile approach
Arguments
- features
feature
sf
object- metric
climate metric
sf
object with 'metric' as the column name of the metric values per planning unit.- targets
data.frame
with list of features under "feature" column and their corresponding targets under "target" column- direction
If direction = 1, metric values are from low (least climate-smart) to high (most climate-smart). If direction = -1, metric values are from high (least climate-smart) to low (most climate-smart).
- percentile
cut-off threshold for determining whether an area is a climate priority area or not (e.g., lower 35th percentile of warming or upper 65th percentile of acidification). Note that the percentile here is the lower limit of the threshold.
Value
A list
with two components: 1. is the data frame passed to prioritizr
when creating a conservation problem containing the binary information per planning unit per feature. 2. are the targets for the features in the conservation problem when the CPA approach is used.
Examples
targets <- dat_species_bin %>%
sf::st_drop_geometry() %>%
colnames() %>%
data.frame() %>%
setNames(c("feature")) %>%
dplyr::mutate(target = 0.3)
Percentile_Approach <- splnr_climate_percentileApproach(
features = dat_species_bin,
metric = dat_clim,
targets = targets,
direction = 1
)
#> [1] "Higher values mean more climate-smart areas."
out_sf <- Percentile_Approach$Features
targets <- Percentile_Approach$Targets