| Title: | Conservation Indicators Using Spatial Information |
|---|---|
| Description: | Supports the assessment of the degree of conservation of taxa in conservation systems, both in ex situ (in genebanks, botanical gardens, and other repositories), and in situ (in protected natural areas). Methods are described in Carver et al. (2021) <doi:10.1111/ecog.05430>, building on Khoury et al. (2020) <doi:10.1073/pnas.2007029117>, Khoury et al. (2019) <doi:10.1016/j.ecolind.2018.11.016>, Khoury et al. (2019) <doi:10.1111/DDI.13008>, Castaneda-Alvarez et al. (2016) <doi:10.1038/nplants.2016.22>, and Ramirez-Villegas et al. (2010) <doi:10.1371/journal.pone.0013497>. |
| Authors: | Dan Carver [aut, cre, cph] (ORCID: <https://orcid.org/0000-0002-1344-6357>), Sarah Gore [aut, cph] (ORCID: <https://orcid.org/0000-0003-0511-7884>), Chrystian Sosa [aut, cph] (ORCID: <https://orcid.org/0000-0002-3734-3248>), Colin Khoury [aut, cph] (ORCID: <https://orcid.org/0000-0001-7893-5744>), Julian Ramirez-Villegas [aut, cph] (ORCID: <https://orcid.org/0000-0002-8044-583X>), Valentin Stefan [ctb], Harold Achicanoy [ctb, cph], Maria Victoria Diaz [ctb, cph], Steven Sotelo [ctb, cph], Nora Castaneda-Alvarez [ctb, cph], Kaue De Sousa [ctb] |
| Maintainer: | Dan Carver <[email protected]> |
| License: | GPL-3 |
| Version: | 2.0.2 |
| Built: | 2026-05-12 17:22:46 UTC |
| Source: | https://github.com/ciat-dapa/gapanalysis |
Checks the class, crs, if the idColumn is a unique ID,
checkEcoregion(ecoregion, sdm, idColumn)checkEcoregion(ecoregion, sdm, idColumn)
ecoregion |
A terra vect object the contains spatial information on all ecoregions of interests |
sdm |
a terra rast object that represented the expected distribution of the species |
idColumn |
A character vector that notes what column within the ecoregions object should be used as a unique ID |
ecoregions : A terra vect object the contains spatial information on all ecoregions of interests
Khoury et al. (2019) Ecological Indicators 98:420-429. doi:10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
##Obtaining Raster_list##Obtaining Raster_list
Checks the column names, column data types, valid lat lon, and can optionally remove any duplicated lat lon records per species. The cleaned and formated dataframe is returned as well as a map object show a quick reference of the points in space.
checkOccurrences(csv, taxon, removeDuplicated = FALSE)checkOccurrences(csv, taxon, removeDuplicated = FALSE)
csv |
A dataframe holding the occurrence data |
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
removeDuplicated |
: Binary parameter. TRUE == duplication values are remove. Set to FALSE as default |
A list object containing 1. data : a data frames of values of occurrence data in the required format 2. map : a leaflet object showing the spatial results of the function
Khoury et al. (2019) Ecological Indicators 98:420-429. doi:10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
# example code ##Obtaining occurrences from example# example code ##Obtaining occurrences from example
Checks the class, values, crs, and cell size of the protected areas raster to ensure these elements match those required by gap analysis functions.
checkProtectedAreas(protectedAreas, sdm)checkProtectedAreas(protectedAreas, sdm)
protectedAreas |
A terra rast object the contian spatial location of protected areas. |
sdm |
a terra rast object that represented the expected distribution of the species |
protectedAreas : a terra rast object representing protected areas
Khoury et al. (2019) Ecological Indicators 98:420-429. doi:10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
##Obtaining Raster_list##Obtaining Raster_list
Evaluates the class, crs, and values are standardizes to what the following gap analysis functions are required.
checksdm(sdm)checksdm(sdm)
sdm |
a terra rast object that represented the expected distribution of the species |
sdm : a terra rast object that is in the correct CRS
Khoury et al. (2019) Ecological Indicators 98:420-429. doi:10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
##Obtaining Raster_list##Obtaining Raster_list
This dataset is a subset of the original dataset for: C. cordata, C. digitata and C. palmata used in Khoury et al. (2019)
CucurbitaDataCucurbitaData
A data frame with 1203 rows and 4 variables:
character: Species name
numeric:Latitude in decimal format
numeric: Longitude in decimal format
character: Source of the record,germplasm (G) or herbarium (H)
Khoury et al. (2019) Plants, People, Planet 2(3):269-283. doi:10.1002/ppp3.10085
This dataset is a subset of species distribution models for: C. cordata, C. digitata and C. palmata used in Khoury et al., 2020
CucurbitaRastsCucurbitaRasts
terra rast object stored as a PackedSpatRaster
Khoury et al. (2019) Diversity and Distributions 26(2):209-225. doi:10.1111/DDI.13008
This dataset is a subset of the Terrestrial Ecoregions of the World shapefile was made available by the world wildlife foundation
ecoregionsecoregions
SpatVector
The ERSex process provides an ecological measurement of the proportion of a species range that can be considered to be conserved in ex situ repositories. The ERSex calculates the proportion of terrestrial ecoregions (The Nature Conservancy Geospatial Conservation Atlas 2019) represented within the G buffered areas out of the total number of ecoregions occupied by the distribution model.
ERSex(taxon, sdm, occurrenceData, gBuffer, ecoregions, idColumn)ERSex(taxon, sdm, occurrenceData, gBuffer, ecoregions, idColumn)
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
sdm |
a terra rast object that represented the expected distribution of the species |
occurrenceData |
a data frame of values containing columns for the taxon, latitude, longitude, and type |
gBuffer |
A terra vect which encompases a specific buffer distance around all G points |
ecoregions |
A terra vect object the contains spatial information on all ecoregions of interests |
idColumn |
A character vector that notes what column within the ecoregions object should be used as a unique ID |
A list object containing 1. results : a data frames of values summarizing the results of the function 2. ecogaps : a terra vect object showing the ecoregions with no area within the g buffer objects 3. map : a leaflet object showing the spatial results of the function
Khoury et al. (2019) Ecological Indicators 98:420-429. doi:10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
##Obtaining occurrences from example data(CucurbitaData) ##Obtaining Raster_list data(CucurbitaRasts) ## ecoregion features data(ecoregions) # convert the dataset for function taxon <- "Cucurbita_cordata" sdm <- terra::unwrap(CucurbitaRasts)$cordata ecoregions <- terra::vect(ecoregions) #Running generateGBuffers gBuffer <- generateGBuffers(taxon = taxon, occurrenceData = CucurbitaData, bufferDistM = 50000 ) #Running ERSex ers_exsitu <- ERSex(taxon = taxon, sdm = sdm, occurrenceData = CucurbitaData, gBuffer = gBuffer, ecoregions = ecoregions, idColumn = "ECO_NAME" )##Obtaining occurrences from example data(CucurbitaData) ##Obtaining Raster_list data(CucurbitaRasts) ## ecoregion features data(ecoregions) # convert the dataset for function taxon <- "Cucurbita_cordata" sdm <- terra::unwrap(CucurbitaRasts)$cordata ecoregions <- terra::vect(ecoregions) #Running generateGBuffers gBuffer <- generateGBuffers(taxon = taxon, occurrenceData = CucurbitaData, bufferDistM = 50000 ) #Running ERSex ers_exsitu <- ERSex(taxon = taxon, sdm = sdm, occurrenceData = CucurbitaData, gBuffer = gBuffer, ecoregions = ecoregions, idColumn = "ECO_NAME" )
The ERSin process provides an ecological measurement of the proportion of a species range that can be considered to be conserved in protected areas. The ERSin calculates the proportion of ecoregions encompassed within the range of the taxon located inside protected areas to the ecoregions encompassed within the total area of the distribution model, considering comprehensive conservation to have been accomplished only when every ecoregion potentially inhabited by a species is included within the distribution of the species located within a protected area.
ERSin(taxon, sdm, occurrenceData, protectedAreas, ecoregions, idColumn)ERSin(taxon, sdm, occurrenceData, protectedAreas, ecoregions, idColumn)
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
sdm |
a terra rast object that represented the expected distribution of the species |
occurrenceData |
a data frame of values containing columns for the taxon, latitude, longitude, and type |
protectedAreas |
A terra rast object the contian spatial location of protected areas. |
ecoregions |
A terra vect object the contains spatial information on all ecoregions of interests |
idColumn |
A character vector that notes what column within the ecoregions object should be used as a unique ID |
A list object containing 1. results : a data frames of values summarizing the results of the function 2. missingEcos : a terra vect object showing all the ecoregions within the distribution with no protected areas present 3. map : a leaflet object showing the spatial results of the function
Khoury et al. (2019) Ecological Indicators 98:420-429. doi:10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
##Obtaining occurrences from example data(CucurbitaData) ##Obtaining Raster_list data(CucurbitaRasts) ##Obtaining protected areas raster data(ProtectedAreas) ## ecoregion features data(ecoregions) # convert the dataset for function taxon <- "Cucurbita_cordata" sdm <- terra::unwrap(CucurbitaRasts)$cordata protectedAreas <- terra::unwrap(ProtectedAreas) ecoregions <- terra::vect(ecoregions) #Running ERSin ers_insitu <- ERSin(taxon = taxon, sdm = sdm, occurrenceData = CucurbitaData, protectedAreas = protectedAreas, ecoregions = ecoregions, idColumn = "ECO_NAME" )##Obtaining occurrences from example data(CucurbitaData) ##Obtaining Raster_list data(CucurbitaRasts) ##Obtaining protected areas raster data(ProtectedAreas) ## ecoregion features data(ecoregions) # convert the dataset for function taxon <- "Cucurbita_cordata" sdm <- terra::unwrap(CucurbitaRasts)$cordata protectedAreas <- terra::unwrap(ProtectedAreas) ecoregions <- terra::vect(ecoregions) #Running ERSin ers_insitu <- ERSin(taxon = taxon, sdm = sdm, occurrenceData = CucurbitaData, protectedAreas = protectedAreas, ecoregions = ecoregions, idColumn = "ECO_NAME" )
Compiles all tabular data from the individual metrics and generate the final results
FCSc_mean(taxon, fcsin, fcsex)FCSc_mean(taxon, fcsin, fcsex)
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
fcsin |
A data frame containing summary results from the fcsin function |
fcsex |
A data frame containing summary results from the fcsex function |
data_comb : a data frame which aggreates final result summaries
Khoury et al. (2019) Ecological Indicators 98:420-429. doi:10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
##Obtaining occurrences from example data(CucurbitaData) ##Obtaining Raster_list data(CucurbitaRasts) ##Obtaining protected areas raster data(ProtectedAreas) ## ecoregion features data(ecoregions) # convert the dataset for function taxon <- "Cucurbita_cordata" sdm <- terra::unwrap(CucurbitaRasts)$cordata occurrenceData <- CucurbitaData protectedAreas <- terra::unwrap(ProtectedAreas) ecoregions <- terra::vect(ecoregions) # generate exsitu conservation summaries srs_exsitu <- SRSex(taxon = taxon, occurrenceData = CucurbitaData ) gBuffer <- generateGBuffers(taxon = taxon, occurrenceData = occurrenceData, bufferDistM = 50000 )#' grs_exsitu <- GRSex(taxon = taxon, sdm = sdm, gBuffer = gBuffer ) ers_exsitu <- ERSex(taxon = taxon, sdm = sdm, occurrenceData = occurrenceData, gBuffer = gBuffer, ecoregions = ecoregions, idColumn = "ECO_NAME" ) #Running fcsex fcs_exsitu <- FCSex(taxon = taxon, srsex = srs_exsitu, grsex = grs_exsitu, ersex = ers_exsitu ) # generate insitu conservation summaries srs_insitu <- SRSin(taxon = taxon, sdm = sdm, occurrenceData = CucurbitaData, protectedAreas = protectedAreas ) grs_insitu <- GRSin(taxon = taxon, sdm = sdm, protectedAreas = protectedAreas ) ers_insitu <- ERSin(taxon = taxon, sdm = sdm, occurrenceData = occurrenceData, protectedAreas = protectedAreas, ecoregions = ecoregions, idColumn = "ECO_NAME" ) #Running fcsin fcs_insitu <- FCSin(taxon = taxon, srsin = srs_insitu, grsin = grs_insitu, ersin = ers_insitu ) fsc_combine <- FCSc_mean(taxon = taxon, fcsin = fcs_insitu, fcsex = fcs_exsitu)##Obtaining occurrences from example data(CucurbitaData) ##Obtaining Raster_list data(CucurbitaRasts) ##Obtaining protected areas raster data(ProtectedAreas) ## ecoregion features data(ecoregions) # convert the dataset for function taxon <- "Cucurbita_cordata" sdm <- terra::unwrap(CucurbitaRasts)$cordata occurrenceData <- CucurbitaData protectedAreas <- terra::unwrap(ProtectedAreas) ecoregions <- terra::vect(ecoregions) # generate exsitu conservation summaries srs_exsitu <- SRSex(taxon = taxon, occurrenceData = CucurbitaData ) gBuffer <- generateGBuffers(taxon = taxon, occurrenceData = occurrenceData, bufferDistM = 50000 )#' grs_exsitu <- GRSex(taxon = taxon, sdm = sdm, gBuffer = gBuffer ) ers_exsitu <- ERSex(taxon = taxon, sdm = sdm, occurrenceData = occurrenceData, gBuffer = gBuffer, ecoregions = ecoregions, idColumn = "ECO_NAME" ) #Running fcsex fcs_exsitu <- FCSex(taxon = taxon, srsex = srs_exsitu, grsex = grs_exsitu, ersex = ers_exsitu ) # generate insitu conservation summaries srs_insitu <- SRSin(taxon = taxon, sdm = sdm, occurrenceData = CucurbitaData, protectedAreas = protectedAreas ) grs_insitu <- GRSin(taxon = taxon, sdm = sdm, protectedAreas = protectedAreas ) ers_insitu <- ERSin(taxon = taxon, sdm = sdm, occurrenceData = occurrenceData, protectedAreas = protectedAreas, ecoregions = ecoregions, idColumn = "ECO_NAME" ) #Running fcsin fcs_insitu <- FCSin(taxon = taxon, srsin = srs_insitu, grsin = grs_insitu, ersin = ers_insitu ) fsc_combine <- FCSc_mean(taxon = taxon, fcsin = fcs_insitu, fcsex = fcs_exsitu)
This function calculates the average of the three ex situ conservation metrics returning a final conservation score summary table. It also assigns conservation priority categories
FCSex(taxon, srsex, grsex, ersex)FCSex(taxon, srsex, grsex, ersex)
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
srsex |
A dataframe contain the results from the srsex function |
grsex |
A dataframe contain the results from the grsex function |
ersex |
A dataframe contain the results from the ersex function |
out_df : a data frames of values summarizing the results of the function
Khoury et al. (2019) Ecological Indicators 98:420-429. doi:10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
##Obtaining occurrences from example data(CucurbitaData) ##Obtaining Raster_list data(CucurbitaRasts) ##Obtaining protected areas raster data(ProtectedAreas) ## ecoregion features data(ecoregions) # convert the dataset for function taxon <- "Cucurbita_cordata" sdm <- terra::unwrap(CucurbitaRasts)$cordata occurrenceData <- CucurbitaData protectedAreas <- terra::unwrap(ProtectedAreas) ecoregions <- terra::unwrap(ecoregions) # generate exsitu conservation summaries srs_exsitu <- SRSex(taxon = taxon, occurrenceData = CucurbitaData ) gBuffer <- generateGBuffers(taxon = taxon, occurrenceData = occurrenceData, bufferDistM = 50000 )#' grs_exsitu <- GRSex(taxon = taxon, sdm = sdm, gBuffer = gBuffer ) ers_exsitu <- ERSex(taxon = taxon, sdm = sdm, occurrenceData = occurrenceData, gBuffer = gBuffer, ecoregions = ecoregions, idColumn = "ECO_NAME" ) #Running fcsex fcs_exsitu <- FCSex(taxon = taxon, srsex = srs_exsitu, grsex = grs_exsitu, ersex = ers_exsitu)##Obtaining occurrences from example data(CucurbitaData) ##Obtaining Raster_list data(CucurbitaRasts) ##Obtaining protected areas raster data(ProtectedAreas) ## ecoregion features data(ecoregions) # convert the dataset for function taxon <- "Cucurbita_cordata" sdm <- terra::unwrap(CucurbitaRasts)$cordata occurrenceData <- CucurbitaData protectedAreas <- terra::unwrap(ProtectedAreas) ecoregions <- terra::unwrap(ecoregions) # generate exsitu conservation summaries srs_exsitu <- SRSex(taxon = taxon, occurrenceData = CucurbitaData ) gBuffer <- generateGBuffers(taxon = taxon, occurrenceData = occurrenceData, bufferDistM = 50000 )#' grs_exsitu <- GRSex(taxon = taxon, sdm = sdm, gBuffer = gBuffer ) ers_exsitu <- ERSex(taxon = taxon, sdm = sdm, occurrenceData = occurrenceData, gBuffer = gBuffer, ecoregions = ecoregions, idColumn = "ECO_NAME" ) #Running fcsex fcs_exsitu <- FCSex(taxon = taxon, srsex = srs_exsitu, grsex = grs_exsitu, ersex = ers_exsitu)
This function calculates the average of the three in situ conservation metrics and assigns a priority category based on the results
FCSin(taxon, srsin, grsin, ersin)FCSin(taxon, srsin, grsin, ersin)
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
srsin |
A dataframe contain the results from the srsin function |
grsin |
A dataframe contain the results from the grsin function |
ersin |
A dataframe contain the results from the ersin function |
out_df : a data frames of values summarizing the results of the function
Khoury et al. (2019) Ecological Indicators 98:420-429. doi:10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
##Obtaining occurrences from example data(CucurbitaData) ##Obtaining Raster_list data(CucurbitaRasts) ##Obtaining protected areas raster data(ProtectedAreas) ## ecoregion features data(ecoregions) # convert the dataset for function taxon <- "Cucurbita_cordata" sdm <- terra::unwrap(CucurbitaRasts)$cordata occurrenceData <- CucurbitaData protectedAreas <- terra::unwrap(ProtectedAreas) ecoregions <- terra::vect(ecoregions) # generate insitu conservation summaries srs_insitu <- SRSin(taxon = taxon, sdm = sdm, occurrenceData = occurrenceData, protectedAreas = protectedAreas ) grs_insitu <- GRSin(taxon = taxon, sdm = sdm, protectedAreas = protectedAreas ) ers_insitu <- ERSin(taxon = taxon, sdm = sdm, occurrenceData = occurrenceData, protectedAreas = protectedAreas, ecoregions = ecoregions, idColumn = "ECO_NAME" ) #Running fcsin FCSin <- FCSin(taxon = taxon, srsin = srs_insitu, grsin = grs_insitu, ersin = ers_insitu )##Obtaining occurrences from example data(CucurbitaData) ##Obtaining Raster_list data(CucurbitaRasts) ##Obtaining protected areas raster data(ProtectedAreas) ## ecoregion features data(ecoregions) # convert the dataset for function taxon <- "Cucurbita_cordata" sdm <- terra::unwrap(CucurbitaRasts)$cordata occurrenceData <- CucurbitaData protectedAreas <- terra::unwrap(ProtectedAreas) ecoregions <- terra::vect(ecoregions) # generate insitu conservation summaries srs_insitu <- SRSin(taxon = taxon, sdm = sdm, occurrenceData = occurrenceData, protectedAreas = protectedAreas ) grs_insitu <- GRSin(taxon = taxon, sdm = sdm, protectedAreas = protectedAreas ) ers_insitu <- ERSin(taxon = taxon, sdm = sdm, occurrenceData = occurrenceData, protectedAreas = protectedAreas, ecoregions = ecoregions, idColumn = "ECO_NAME" ) #Running fcsin FCSin <- FCSin(taxon = taxon, srsin = srs_insitu, grsin = grs_insitu, ersin = ers_insitu )
Performs data cleaning to generate a summary of all input occurrence data. These values area used in the SRSex function.
generateCounts(taxon, occurrenceData)generateCounts(taxon, occurrenceData)
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
occurrenceData |
a data frame of values containing columns for the taxon, latitude, longitude, and type |
countsData : a data frames of values summarizing the results of the function
Khoury et al. (2019) Ecological Indicators 98:420-429. doi:10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
##Obtaining occurrences from example data(CucurbitaData) # convert the dataset for function taxon <- "Cucurbita_cordata" occurrenceData <- CucurbitaData #Running generateCounts counts <- generateCounts(taxon = taxon, occurrenceData = occurrenceData )##Obtaining occurrences from example data(CucurbitaData) # convert the dataset for function taxon <- "Cucurbita_cordata" occurrenceData <- CucurbitaData #Running generateCounts counts <- generateCounts(taxon = taxon, occurrenceData = occurrenceData )
Utilizes the occurrence data location to select all ecoregions that intersect with thoses points. Helpful as it reduces the overall file size of the ecoregion object.
generateEcoSelection(taxon, occurrenceData, ecoregions, idColumn)generateEcoSelection(taxon, occurrenceData, ecoregions, idColumn)
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
occurrenceData |
a data frame of values containing columns for the taxon, latitude, longitude, and type |
ecoregions |
A terra vect object the contains spatial information on all ecoregions of interests |
idColumn |
A character vector that notes what column within the ecoregions object should be used as a unique ID |
selectedEcos : a terra vect that contains the selected ecoregion features
Khoury et al. (2019) Ecological Indicators 98:420-429. doi:10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
##Obtaining occurrences from example data(CucurbitaData) ## ecoregion features data(ecoregions) # convert the dataset for function taxon <- "Cucurbita_cordata" occurrenceData <- CucurbitaData ecoregions <- terra::vect(ecoregions) #Running generateEcoSelection selectedEcos <- generateEcoSelection(taxon = taxon, occurrenceData = occurrenceData, ecoregions = ecoregions, idColumn = "ECO_NAME" )##Obtaining occurrences from example data(CucurbitaData) ## ecoregion features data(ecoregions) # convert the dataset for function taxon <- "Cucurbita_cordata" occurrenceData <- CucurbitaData ecoregions <- terra::vect(ecoregions) #Running generateEcoSelection selectedEcos <- generateEcoSelection(taxon = taxon, occurrenceData = occurrenceData, ecoregions = ecoregions, idColumn = "ECO_NAME" )
Produces a terra vect object representing the area around the G type occurrences
generateGBuffers(taxon, occurrenceData, bufferDistM)generateGBuffers(taxon, occurrenceData, bufferDistM)
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
occurrenceData |
a data frame of values containing columns for the taxon, latitude, longitude, and type |
bufferDistM |
Distance in meters. Used to set the size of the buffered objects. |
A list object containing 1. data : a terra vect object showing all the buffered areas around the G type occurrences 2. map : a leaflet object showing the spatial results of the function
Khoury et al. (2019) Ecological Indicators 98:420-429. doi:10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
##Obtaining occurrences from example data(CucurbitaData) # convert the dataset for function taxon <- "Cucurbita_cordata" occurrenceData <- CucurbitaData #Running generateGBuffers gBuffer <- generateGBuffers(taxon = taxon, occurrenceData = occurrenceData, bufferDistM = 50000 )##Obtaining occurrences from example data(CucurbitaData) # convert the dataset for function taxon <- "Cucurbita_cordata" occurrenceData <- CucurbitaData #Running generateGBuffers gBuffer <- generateGBuffers(taxon = taxon, occurrenceData = occurrenceData, bufferDistM = 50000 )
Ecoregions and protected area data base are stored on a harvard dataverse repository. This functions check to see if those datasets have been download and will download them if not present.
getDatasets()getDatasets()
A message confirming the datasets were downloaded, along with saving the files to the package's data directory.
Khoury et al. (2019) Ecological Indicators 98:420-429. doi:10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
The GRSex process provides a geographic measurement of the proportion of a species’ range that can be considered to be conserved in ex situ repositories. The GRSex uses buffers (default 50 km radius) created around each G coordinate point to estimate geographic areas already well collected within the distribution models of each taxon, and then calculates the proportion of the distribution model covered by these buffers.
GRSex(taxon, sdm, gBuffer)GRSex(taxon, sdm, gBuffer)
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
sdm |
a terra rast object that represented the expected distribution of the species |
gBuffer |
A terra vect which encompases a specific buffer distance around all G points |
A list object containing 1. results : a data frames of values summarizing the results of the function 2. gGaps : a terra vect object showing buffered area about g points 3. map : a leaflet object showing the spatial results of the function
Khoury et al. (2019) Ecological Indicators 98:420-429. doi:10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
##Obtaining occurrences from example data(CucurbitaData) ##Obtaining Raster_list data(CucurbitaRasts) ##Obtaining protected areas raster data(ProtectedAreas) ## ecoregion features data(ecoregions) # convert the dataset for function taxon <- "Cucurbita_cordata" sdm <- terra::unwrap(CucurbitaRasts)$cordata occurrenceData <- CucurbitaData # generate the g buffer object gBuffer <- generateGBuffers(taxon = taxon, occurrenceData = occurrenceData, bufferDistM = 50000) #Running GRSex grs_exsitu <- GRSex(taxon = taxon, sdm = sdm, gBuffer = gBuffer )##Obtaining occurrences from example data(CucurbitaData) ##Obtaining Raster_list data(CucurbitaRasts) ##Obtaining protected areas raster data(ProtectedAreas) ## ecoregion features data(ecoregions) # convert the dataset for function taxon <- "Cucurbita_cordata" sdm <- terra::unwrap(CucurbitaRasts)$cordata occurrenceData <- CucurbitaData # generate the g buffer object gBuffer <- generateGBuffers(taxon = taxon, occurrenceData = occurrenceData, bufferDistM = 50000) #Running GRSex grs_exsitu <- GRSex(taxon = taxon, sdm = sdm, gBuffer = gBuffer )
The GRSin process provides a geographic measurement of the proportion of a species’ range that can be considered to be conserved in protected areas. The GRSin compares the area of the distribution model located within protected areas versus the total area of the model, considering comprehensive conservation to have been accomplished only when the entire distribution occurs within protected areas.
GRSin(taxon, sdm, protectedAreas)GRSin(taxon, sdm, protectedAreas)
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
sdm |
a terra rast object that represented the expected distribution of the species |
protectedAreas |
A terra rast object the contian spatial location of protected areas. |
A list object containing 1. results : a data frames of values summarizing the results of the function 2. protectAreaMask : a terra rast object showing all the protected areas within the distribution 3. map : a leaflet object showing the spatial results of the function
Khoury et al. (2019) Ecological Indicators 98:420-429. doi:10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
##Obtaining Raster_list data(CucurbitaRasts) ##Obtaining protected areas raster data(ProtectedAreas) # convert the dataset for function taxon <- "Cucurbita_cordata" sdm <- terra::unwrap(CucurbitaRasts)$cordata protectedAreas <- terra::unwrap(ProtectedAreas) #Running GRSin grs_insitu <- GRSin(taxon = taxon, sdm = sdm, protectedAreas = protectedAreas )##Obtaining Raster_list data(CucurbitaRasts) ##Obtaining protected areas raster data(ProtectedAreas) # convert the dataset for function taxon <- "Cucurbita_cordata" sdm <- terra::unwrap(CucurbitaRasts)$cordata protectedAreas <- terra::unwrap(ProtectedAreas) #Running GRSin grs_insitu <- GRSin(taxon = taxon, sdm = sdm, protectedAreas = protectedAreas )
This dataset is a raster version of the world protected areas dataset used in Khoury et al., (2019)
ProtectedAreasProtectedAreas
terra rast object
https://www.protectedplanet.net/en
Khoury et al. (2019) Ecological Indicators 98:420-429. doi:10.1016/j.ecolind.2018.11.016
The SRSex process provides a general indication of the completeness of ex situ conservation collections, calculating the ratio of germplasm accessions (G) available in ex situ repositories to reference (H) records for each taxon, making use of all compiled records, regardless of whether they include coordinates, with an ideal (i.e., comprehensive) conservation ratio of 1:1. In this and in the subsequent measurements, if no G or H records exist, taxa are automatically considered to be of high priority for further conservation action and assigned a value of 0. If there are more G than H records, SRSex is set to 100.
SRSex(taxon, occurrenceData)SRSex(taxon, occurrenceData)
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
occurrenceData |
a data frame of values containing columns for the taxon, latitude, longitude, and type |
out_df : a data frames of values summarizing the results of the function
Khoury et al. (2019) Ecological Indicators 98:420-429. doi:10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
##Obtaining occurrences from example data(CucurbitaData) # convert the dataset for function taxon <- "Cucurbita_cordata" #Running SRSex srs_exsitu <- SRSex(taxon = taxon, occurrenceData = CucurbitaData )##Obtaining occurrences from example data(CucurbitaData) # convert the dataset for function taxon <- "Cucurbita_cordata" #Running SRSex srs_exsitu <- SRSex(taxon = taxon, occurrenceData = CucurbitaData )
The SRSin process calculates the proportion of all occurrences of a taxon falling within the distribution model that also fall within a protected area
SRSin(taxon, sdm, occurrenceData, protectedAreas)SRSin(taxon, sdm, occurrenceData, protectedAreas)
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
sdm |
a terra rast object that |
occurrenceData |
a data frame of values containing columns for the taxon, latitude, longitude, and type |
protectedAreas |
A terra rast object the contian spatial location of protected areas. |
A list object containing 1. results : a data frames of values summarizing the results of the function 2. points : a terra vect object showing all the points present within protected areas 3. map : a leaflet object showing the spatial results of the function
Khoury et al. (2019) Ecological Indicators 98:420-429. doi:10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
##Obtaining occurrences from example data(CucurbitaData) ##Obtaining Raster_list data(CucurbitaRasts) ##Obtaining protected areas raster data(ProtectedAreas) # convert the dataset for function taxon <- "Cucurbita_cordata" sdm <- terra::unwrap(CucurbitaRasts)$cordata occurrenceData <- CucurbitaData protectedAreas <- terra::unwrap(ProtectedAreas) #Running SRSin srs_insitu <- SRSin(taxon = taxon, sdm = sdm, occurrenceData = occurrenceData, protectedAreas = protectedAreas )##Obtaining occurrences from example data(CucurbitaData) ##Obtaining Raster_list data(CucurbitaRasts) ##Obtaining protected areas raster data(ProtectedAreas) # convert the dataset for function taxon <- "Cucurbita_cordata" sdm <- terra::unwrap(CucurbitaRasts)$cordata occurrenceData <- CucurbitaData protectedAreas <- terra::unwrap(ProtectedAreas) #Running SRSin srs_insitu <- SRSin(taxon = taxon, sdm = sdm, occurrenceData = occurrenceData, protectedAreas = protectedAreas )