Skip to contents

Function to run the climate-priority-area approach

Usage

splnr_climate_priorityAreaApproach(
  featuresDF,
  metricDF,
  targetsDF,
  direction,
  percentile = 5,
  refugiaTarget = 1
)

Arguments

featuresDF

feature sfobject which should have a column for cellID

metricDF

climate metric data.frame with 'metric' as the column name of the metric values per planning unit. This should also have a column for the cellID

targetsDF

data.framewith 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.

refugiaTarget

target assigned to climate-smart areas

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

Features <- dat_species_bin %>%
  dplyr::select(-"cellID")

target <- Features %>%
  sf::st_drop_geometry() %>%
  colnames() %>%
  data.frame() %>%
  setNames(c("feature")) %>%
  dplyr::mutate(target = 0.3)

metric_df <- dat_clim


CPA_Approach <- splnr_climate_priorityAreaApproach(
  featuresDF = dat_species_bin,
  metricDF = metric_df, targetsDF = target, direction = -1
)
out_sf <- CPA_Approach$Features
targets <- CPA_Approach$Targets