mpg: Mean Protection Gap (MPG) Function

View source: R/mpg.R

mpgR Documentation

Mean Protection Gap (MPG) Function

Description

The mean protection gap (MPG) function determines the degree of representation target shortfall as a value between 0 and 1.

Usage

mpg(data = list(), target, plot = TRUE)

Arguments

data

data is a dataframe with three columns: feature, ai, and pi. feature is the name of the conservation features (e.g. ecoregions, habitats, species), ai is the total area/amount of conservation features and pi is the protected area/amount of conservation features.

target

target is the representation target as a value between 0 and 1 (0 is zero protection and 1 is 100% protection).

plot

plots the target and the protected amount of conservation features ordered from low to high. Defaults to TRUE.

Value

mpg Mean Protection Gap value (0 is no gap and 1 is 100% gap to representation target)
target representation target
N number of conservation features
proportion_protected protected proportion of conservation features as a value from 0 to 1, sorted from low to high

Examples

# Generate input data
feature <- paste("Ecoregion",1:10)  #conservation feature names
ai      <- c(41,223,1053,520,230,303,343,2684,6507,1010)  #total amount of conservation features
pi      <- c(0,53,282,237,70,5,123,606,2695,496)  #protected amount of conservation features
data    <- data.frame(feature,ai,pi)

# Run the mpg function for representation target 0.3 (30% protection of each feature)
mpg(data,0.3,plot=TRUE)

KerstinJantke/ConsTarget documentation built on May 10, 2024, 11:32 a.m.