Title: | A Metric to Rank Locations for Biodiversity Conservation |
---|---|
Description: | Calculates the WEGE (Weighted Endemism including Global Endangerment index) index for a particular area. Additionally it also calculates rasters of KBA's (Key Biodiversity Area) criteria (A1a, A1b, A1e, and B1), Weighted endemism (WE), the EDGE (Evolutionarily Distinct and Globally Endangered) score, Evolutionary Distinctiveness (ED) and Extinction risk (ER). Farooq, H., Azevedo, J., Belluardo F., Nanvonamuquitxo, C., Bennett, D., Moat, J., Soares, A., Faurby, S. & Antonelli, A. (2020) <doi:10.1101/2020.01.17.910299>. |
Authors: | Harith Farooq [aut, cre]
|
Maintainer: | Harith Farooq <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2025-02-28 04:31:30 UTC |
Source: | https://github.com/cran/WEGE |
A function to get the WEGE index value for a provided polygon.
get_edge( target_area, input, x, y, species = "binomial", ed = "ED", category = "category", res = 1 )
get_edge( target_area, input, x, y, species = "binomial", ed = "ED", category = "category", res = 1 )
target_area |
Either a sp or sf object to which to calculate the WEGE index. |
input |
Species ranges, either from a shapefile or from a georeferenced species list with a column for species, two columns for coordinates and one for the IUCN category. |
x |
name of the longitude column. |
y |
name of the latitude column. |
species |
name of the species column. |
ed |
name of the evolutionary distinctiveness column. |
category |
name of IUCN the category column. Terminology must be as follows: DD for Data Deficient, LC for Least Concern, NT for Near Threatened, EN, for Endangered, CR for Critically Endangered, EW for Extinct in the wild and EX for Extinct. |
res |
grid-cell size to use to calculate the range of the species in case a georeferenced species list was provided. |
a value corresponding to the EDGE score of the provided target_area
library(WEGE) library(sp) library(sf) species <- letters[1:26] range_list <- list() for (i in seq_along(species)) { temp0 <- cbind(runif(3,1,50),runif(3,1,50)) temp <- Polygon(rbind(temp0,temp0[1,])) range_list[[i]] <- Polygons(list(temp), ID = c(species[i])) } input <- st_as_sf(SpatialPolygons(range_list)) categories <- c('LC','NT','VU','EN','CR') input$binomial <- species input$category <- sample(size = nrow(input),x = categories,replace = TRUE) input$ED <- runif(nrow(input),1,30) temp0 <- cbind(runif(3,1,50),runif(3,1,50)) target_area <- Polygon(rbind(temp0,temp0[1,])) target_area <- Polygons(list(target_area), ID = 'Target area') target_area <- st_as_sf(SpatialPolygons(list(target_area))) get_edge(target_area = target_area,input = input,species = 'binomial',category = 'category')
library(WEGE) library(sp) library(sf) species <- letters[1:26] range_list <- list() for (i in seq_along(species)) { temp0 <- cbind(runif(3,1,50),runif(3,1,50)) temp <- Polygon(rbind(temp0,temp0[1,])) range_list[[i]] <- Polygons(list(temp), ID = c(species[i])) } input <- st_as_sf(SpatialPolygons(range_list)) categories <- c('LC','NT','VU','EN','CR') input$binomial <- species input$category <- sample(size = nrow(input),x = categories,replace = TRUE) input$ED <- runif(nrow(input),1,30) temp0 <- cbind(runif(3,1,50),runif(3,1,50)) target_area <- Polygon(rbind(temp0,temp0[1,])) target_area <- Polygons(list(target_area), ID = 'Target area') target_area <- st_as_sf(SpatialPolygons(list(target_area))) get_edge(target_area = target_area,input = input,species = 'binomial',category = 'category')
A function to get the WEGE index value for a provided polygon.
get_kba_criteria( target_area, input, x, y, species = "binomial", category = "category", res = 1 )
get_kba_criteria( target_area, input, x, y, species = "binomial", category = "category", res = 1 )
target_area |
Either a sp or sf object to which to calculate the WEGE index. |
input |
Species ranges, either from a shapefile or from a georeferenced species list with a column for species, two columns for coordinates and one for the IUCN category. |
x |
name of the longitude column. |
y |
name of the latitude column. |
species |
name of the species column. |
category |
name of IUCN the category column. Terminology must be as follows: DD for Data Deficient, LC for Least Concern, NT for Near Threatened, EN, for Endangered, CR for Critically Endangered, EW for Extinct in the wild and EX for Extinct. |
res |
grid-cell size to use to calculate the range of the species in case a georeferenced species list was provided. |
a data.frame containing all the species that trigger KBA status as well as the criteria they trigger.
library(WEGE) library(sp) library(sf) species <- letters[1:26] range_list <- list() for (i in seq_along(species)){ temp0 <- cbind(runif(3,1,50),runif(3,1,50)) temp <- Polygon(rbind(temp0,temp0[1,])) range_list[[i]] <- Polygons(list(temp), ID = c(species[i])) } input <- st_as_sf(SpatialPolygons(range_list)) categories <- c('LC','NT','VU','EN','CR') input$binomial <- species input$category <- sample(size = nrow(input),x = categories,replace = TRUE) temp0 <- cbind(runif(3,1,50),runif(3,1,50)) target_area <- Polygon(rbind(temp0,temp0[1,])) target_area <- Polygons(list(target_area), ID = 'Target area') target_area <- st_as_sf(SpatialPolygons(list(target_area))) get_kba_criteria(target_area,input)
library(WEGE) library(sp) library(sf) species <- letters[1:26] range_list <- list() for (i in seq_along(species)){ temp0 <- cbind(runif(3,1,50),runif(3,1,50)) temp <- Polygon(rbind(temp0,temp0[1,])) range_list[[i]] <- Polygons(list(temp), ID = c(species[i])) } input <- st_as_sf(SpatialPolygons(range_list)) categories <- c('LC','NT','VU','EN','CR') input$binomial <- species input$category <- sample(size = nrow(input),x = categories,replace = TRUE) temp0 <- cbind(runif(3,1,50),runif(3,1,50)) target_area <- Polygon(rbind(temp0,temp0[1,])) target_area <- Polygons(list(target_area), ID = 'Target area') target_area <- st_as_sf(SpatialPolygons(list(target_area))) get_kba_criteria(target_area,input)
A function to get the WEGE index value for a provided polygon.
get_wege( target_area, input, x, y, species = "binomial", category = "category", res = 1 )
get_wege( target_area, input, x, y, species = "binomial", category = "category", res = 1 )
target_area |
Either a sp or sf object to which to calculate the WEGE index. |
input |
Species ranges, either from a shapefile or from a georeferenced species list with a column for species, two columns for coordinates and one for the IUCN category. |
x |
name of the longitude column. |
y |
name of the latitude column. |
species |
name of the species column. |
category |
name of IUCN the category column. Terminology must be as follows: DD for Data Deficient, LC for Least Concern, NT for Near Threatened, EN, for Endangered, CR for Critically Endangered, EW for Extinct in the wild and EX for Extinct. |
res |
grid-cell size to use to calculate the range of the species in case a georeferenced species list was provided. |
a value corresponding to the WEGE index value of the provided target_area
library(sp) library(sf) library(WEGE) species <- letters[1:26] range_list <- list() for (i in seq_along(species)){ temp <- Polygon(cbind(runif(4,1,50),runif(4,1,50))) range_list[[i]] <- Polygons(list(temp), ID = c(species[i]))} input <- st_as_sf(SpatialPolygons(range_list)) categories <- c('LC','NT','VU','EN','CR') input$binomial <- species input$category <- sample(size = nrow(input),x = categories,replace = TRUE) target_area <- Polygon(cbind(runif(4,1,50),runif(4,1,50))) target_area <- Polygons(list(target_area), ID = 'Target area') target_area <- st_as_sf(SpatialPolygons(list(target_area))) get_wege(target_area,input,species = 'binomial',category = 'category')
library(sp) library(sf) library(WEGE) species <- letters[1:26] range_list <- list() for (i in seq_along(species)){ temp <- Polygon(cbind(runif(4,1,50),runif(4,1,50))) range_list[[i]] <- Polygons(list(temp), ID = c(species[i]))} input <- st_as_sf(SpatialPolygons(range_list)) categories <- c('LC','NT','VU','EN','CR') input$binomial <- species input$category <- sample(size = nrow(input),x = categories,replace = TRUE) target_area <- Polygon(cbind(runif(4,1,50),runif(4,1,50))) target_area <- Polygons(list(target_area), ID = 'Target area') target_area <- st_as_sf(SpatialPolygons(list(target_area))) get_wege(target_area,input,species = 'binomial',category = 'category')
A function to get the WEGE index value for a provided polygon.
spat_ras( target_area, input, x, y, species = "binomial", category = "category", show_progress = FALSE, ed, res = 1 )
spat_ras( target_area, input, x, y, species = "binomial", category = "category", show_progress = FALSE, ed, res = 1 )
target_area |
Either a sp or sf object to which to calculate the WEGE index. |
input |
Species ranges, either from a shapefile or from a georeferenced species list with a column for species, two columns for coordinates and one for the IUCN category. |
x |
name of the longitude column. |
y |
name of the latitude column. |
species |
name of the species column. |
category |
name of IUCN the category column. Terminology must be as follows: DD for Data Deficient, LC for Least Concern, NT for Near Threatened, EN, for Endangered, CR for Critically Endangered, EW for Extinct in the wild and EX for Extinct. |
show_progress |
Progress of the analysis by showing the number of the grid where the function is calculating the different indices. |
ed |
name of the evolutionary distinctiveness column. |
res |
grid-cell size to use to calculate the range of the species in case a georeferenced species list was provided. |
A RasterStack with rasters for each KBA criteria (A1a,A1b,A1e,B1) and indices calculated (GE,ED,EDGE,WEGE)
library(WEGE) library(sp) library(sf) library(raster) species <- sample(letters, 10) range_list <- list() for (i in seq_along(species)) { temp0 <- cbind(runif(3,1,50),runif(3,1,50)) temp <- Polygon(rbind(temp0,temp0[1,])) range_list[[i]] <- Polygons(list(temp), ID = c(species[i])) } input <- st_as_sf(SpatialPolygons(range_list)) categories <- c('LC','NT','VU','EN','CR') input$binomial <- species input$category <- sample(size = nrow(input),x = categories,replace = TRUE) input$ed <- runif(runif(10,1,50)) temp0 <- cbind(runif(3,1,50),runif(3,1,50)) target_area <- Polygon(rbind(temp0,temp0[1,])) target_area <- Polygons(list(target_area), ID = 'Target area') target_area <- st_as_sf(SpatialPolygons(list(target_area))) spat_ras(target_area,input,species = 'binomial',ed='ed', res = 1)
library(WEGE) library(sp) library(sf) library(raster) species <- sample(letters, 10) range_list <- list() for (i in seq_along(species)) { temp0 <- cbind(runif(3,1,50),runif(3,1,50)) temp <- Polygon(rbind(temp0,temp0[1,])) range_list[[i]] <- Polygons(list(temp), ID = c(species[i])) } input <- st_as_sf(SpatialPolygons(range_list)) categories <- c('LC','NT','VU','EN','CR') input$binomial <- species input$category <- sample(size = nrow(input),x = categories,replace = TRUE) input$ed <- runif(runif(10,1,50)) temp0 <- cbind(runif(3,1,50),runif(3,1,50)) target_area <- Polygon(rbind(temp0,temp0[1,])) target_area <- Polygons(list(target_area), ID = 'Target area') target_area <- st_as_sf(SpatialPolygons(list(target_area))) spat_ras(target_area,input,species = 'binomial',ed='ed', res = 1)
WEGE is an R package that allows the user to calculate the WEGE index for a particular area. Additionally it also calculates rasters of KBA criteria (A1a, A1b, A1e, and B1) Weighted endemism, the EDGE score, Evolutionary Distinctiveness and Extinction risk.