Title: | A Method to Estimate the Accuracy and Biogeographical Status of Georeferenced Biological Data |
---|---|
Description: | Automated assessment of accuracy and geographical status of georeferenced biological data. The methods rely on reference regions, namely checklists and range maps. Includes functions to obtain data from the Global Biodiversity Information Facility <https://www.gbif.org/> and from the Global Inventory of Floras and Traits <https://gift.uni-goettingen.de/home>. Alternatively, the user can input their own data. Furthermore, provides easy visualisation of the data and the results through the plotting functions. Especially suited for large datasets. The reference for the methodology is: Arlé et al. (under review). |
Authors: | Eduardo Arlé [aut, cre], Alexander Zizka [aut], Patrick Weigelt [ctb], Sam Levin [ctb], Carsten Meyer [ths] |
Maintainer: | Eduardo Arlé <[email protected]> |
License: | GPL (>= 2) |
Version: | 2.0.0 |
Built: | 2025-02-26 05:31:36 UTC |
Source: | https://github.com/eduardoarle/bracatus |
Estimates the Accuracy of Each Point Record.
accuracy(signals)
accuracy(signals)
signals |
output of the function "signalCalculation". A data.frame including the original point data and the signals sent by the reference regions. |
The data.frame with the species occurrence information and an extra column indicating the estimated accuracy of each point.
List of countries and entities names for checklists
availableCountries()
availableCountries()
This function provides a list of countries and entities names available with rworldmaps for checklists
country_list <- availableCountries()
country_list <- availableCountries()
Estimates the biogeographic status of each point record.
biogeoStatus(signals)
biogeoStatus(signals)
signals |
output of the function signalCalculation. A dataFrame including the original point data and the signals sent by the reference regions. |
The dataFrame with the species occurrence information and an extra column indicating the estimated biogeographic status of each point.
Prepares user provided reference regions on a country level
countryChecklist(countries, biogeo_status)
countryChecklist(countries, biogeo_status)
countries |
vector with one or more country names |
biogeo_status |
vector informing the status of each country: alien, native or unknown |
This function provides shapefiles of countries with the correspondent biogeographic status of the species.
country_checklist <- countryChecklist( c("Brazil","Argentina","Uruguay","Paraguay"), c("native","alien","unknown","native"))
country_checklist <- countryChecklist( c("Brazil","Argentina","Uruguay","Paraguay"), c("native","alien","unknown","native"))
Downloads GBIF records iterating when necessary to overcome the limitation of 200,000 records
getOcc(species)
getOcc(species)
species |
character, species binomial name |
This function downloads all records for a species from GBIF that have coordinates info. If necessary it loops several times to overcome the limit of 200,000 occurrences imposed by occ_search function. It returns a data table.
sps_occurrence <- getOcc("Babiana tubulosa")
sps_occurrence <- getOcc("Babiana tubulosa")
Gets regions listed by GIFT for plant species
giftRegions(species, min_size = 1000, max_size = 1e+11)
giftRegions(species, min_size = 1000, max_size = 1e+11)
species |
character, species binomial name |
min_size |
numeric, minimum size of checklists (in km2) to be included in the analysis. |
max_size |
numeric, maximum size of checklists (in km2) to be included in the analysis. |
This function returns a list containing three shapefiles derived by information supplied by GIFT. "regs" includes all the features corresponding to regions where the species has been listed as present. "regs_native" includes all the features corresponding to regions where the species has been listed as native. And "regs_alien" includes all the features corresponding to regions where the species has been listed as alien.
gift_reference_regions <- giftRegions("Babiana tubulosa")
gift_reference_regions <- giftRegions("Babiana tubulosa")
Prepares user provided georeferenced biological data for the models
giveOcc( occ_data, species = "species", longitude = "longitude", latitude = "latitude" )
giveOcc( occ_data, species = "species", longitude = "longitude", latitude = "latitude" )
occ_data |
table containing latitude and longitude |
species |
col.name containing the species information |
longitude |
col.name containing the longitude information |
latitude |
col.name containing the latitude information |
This function standardises the user provided georeferenced biological data to be fed into the models.
# Create a data.frame containing species names and coordinates test_data <- data.frame(sps=rep("Equus acephalus",10), lon=c(-43.2,-58.4,-56,-44,-54.5,-57.4,-60.1,-68.5,-71.3,-47.5), lat=c(-22.9,-34.6,-34.8,-20,-25.5,-25.2,-3,-32.5,-41.1,-15.5), gender=rep("female",10),head_size=rep("headless individual")) sps_occurrence <- giveOcc(test_data,"sps","lon","lat")
# Create a data.frame containing species names and coordinates test_data <- data.frame(sps=rep("Equus acephalus",10), lon=c(-43.2,-58.4,-56,-44,-54.5,-57.4,-60.1,-68.5,-71.3,-47.5), lat=c(-22.9,-34.6,-34.8,-20,-25.5,-25.2,-3,-32.5,-41.1,-15.5), gender=rep("female",10),head_size=rep("headless individual")) sps_occurrence <- giveOcc(test_data,"sps","lon","lat")
Input checklist regions
giveRegions(regs, regs_native, regs_alien)
giveRegions(regs, regs_native, regs_alien)
regs |
shapefile containing all regions of occurrence. |
regs_native |
shapefile containing regions where the species is native. |
regs_alien |
shapefile containing regions where the species is alien. |
This function returns a list containing three shapefiles derived by information supplied by GIFT. "regs" includes all the features corresponding to regions where the species has been listed as present. "regs_native" includes all the features corresponding to regions where the species has been listed as native. And "regs_alien" includes all the features corresponding to regions where the species has been listed as alien.
library(rnaturalearth) world <- ne_countries(returnclass = "sf") reg_names <- c("Brazil","Argentina","Uruguay","Paraguay") reg_native <- c("Brazil","Paraguay") reg_alien <- c("Argentina") regs <- world[which(world$name_sort %in% reg_names),] regs_native <- world[which(world$name_sort %in% reg_native),] regs_alien <- world[which(world$name_sort %in% reg_alien),] regs_list <- giveRegions(regs,regs_native,regs_alien)
library(rnaturalearth) world <- ne_countries(returnclass = "sf") reg_names <- c("Brazil","Argentina","Uruguay","Paraguay") reg_native <- c("Brazil","Paraguay") reg_alien <- c("Argentina") regs <- world[which(world$name_sort %in% reg_names),] regs_native <- world[which(world$name_sort %in% reg_native),] regs_alien <- world[which(world$name_sort %in% reg_alien),] regs_list <- giveRegions(regs,regs_native,regs_alien)
Gets regions listed by GloNAF for plant species
glonafRegions(species, native = "gift", nat_ref_reg = NULL)
glonafRegions(species, native = "gift", nat_ref_reg = NULL)
species |
character, species binomial name |
native |
character, source for the native reference regions. Options are "gift", "range map", or "checklist". If "gift" is chosen, the function will automatically download native regions listed by GIFT for the species. If "range map" or "checklist" is chosen, the user must provide a shapefile with either the species range map, or the features representing regions where it has been listed as native. Default is "gift". |
nat_ref_reg |
shapefile containing either the species native range map or checklist. The user must inform which reference region data type is being provided in the parameter "native". |
This function returns a list containing three shapefiles derived by information supplied by GloNAF for the alien reference regions, and the chosen source for the native reference regions. "regs" includes all the features corresponding to regions where the species has been listed as present. "regs_native" includes all the features corresponding to regions where the species has been listed as native. And "regs_alien" includes all the features corresponding to regions where the species has been listed as alien.
glonaf_reference_regions <- glonafRegions("Ambrosia grayi")
glonaf_reference_regions <- glonafRegions("Ambrosia grayi")
A SpatialPointsDataFrame
containing the occurrences of
Hemitriccus mirandae downloaded from GBIF
data("H_mirandae_sp")
data("H_mirandae_sp")
A Raster
half-degree raster of the world with unique IDs per cell
data("ID_raster")
data("ID_raster")
A glm
accuracy model
data("Model_accuracy")
data("Model_accuracy")
A glm
biogeographical model
data("Model_biogeo")
data("Model_biogeo")
Downloads gbif records iterating when necessary to overcome the limitation of 200,000 records
occSpatialPoints(occ)
occSpatialPoints(occ)
occ |
table |
This function creates spatialPoints from tables containing coordinates.
# Create a data.frame containing species names and coordinates test_data <- data.frame(sps=rep("Equus acephalus",10), lon=c(-43.2,-58.4,-56,-44,-54.5,-57.4,-60.1,-68.5,-71.3,-47.5), lat=c(-22.9,-34.6,-34.8,-20,-25.5,-25.2,-3,-32.5,-41.1,-15.5), gender=rep("female",10),head_size=rep("headless individual")) sps_occurrence <- giveOcc(test_data,"sps","lon","lat") sps_sp <- occSpatialPoints(sps_occurrence)
# Create a data.frame containing species names and coordinates test_data <- data.frame(sps=rep("Equus acephalus",10), lon=c(-43.2,-58.4,-56,-44,-54.5,-57.4,-60.1,-68.5,-71.3,-47.5), lat=c(-22.9,-34.6,-34.8,-20,-25.5,-25.2,-3,-32.5,-41.1,-15.5), gender=rep("female",10),head_size=rep("headless individual")) sps_occurrence <- giveOcc(test_data,"sps","lon","lat") sps_sp <- occSpatialPoints(sps_occurrence)
Plot the species occurrences showing the estimated accuracy of points.
plotAccuracy( acc, regional = TRUE, reg.by = "country", borders = TRUE, col.features = "khaki", col.bg = "azure2", plot.range = FALSE, range = NULL, box = FALSE )
plotAccuracy( acc, regional = TRUE, reg.by = "country", borders = TRUE, col.features = "khaki", col.bg = "azure2", plot.range = FALSE, range = NULL, box = FALSE )
acc |
dataTable of the species occurrence including a column with the estimated accuracy of points. |
regional |
logical, whether the whole world should be plotted as the background or only the region adjacent to the species countries of occurrence. |
reg.by |
character, by countries where there are points or by area where the points are located. |
borders |
logical, whether country limits should be plotted. |
col.features |
colour for plotting features. |
col.bg |
colour for plotting the background. |
plot.range |
logical, if TRUE, range maps should be provided as a shapefile in argument range. |
range |
shapefile, species range map. |
box |
logical, includes frame with coordinates locations. |
This function plots the species occurrence with estimated accuracy of all points.
Plot the species occurrences showing the estimated biogeographical status of points.
plotBiogeoStatus( biogeo, regional = TRUE, reg.by = "country", borders = TRUE, col.features = "khaki", col.bg = "azure2", plot.range = FALSE, range = NULL, box = FALSE )
plotBiogeoStatus( biogeo, regional = TRUE, reg.by = "country", borders = TRUE, col.features = "khaki", col.bg = "azure2", plot.range = FALSE, range = NULL, box = FALSE )
biogeo |
dataTable of the species occurrence including a column with the estimated biogeographical status of points. |
regional |
logical, whether the whole world should be plotted as the background or only the region adjacent to the species countries of occurrence. |
reg.by |
character, by countries where there are points or by area where the points are located. |
borders |
logical, whether country limits should be plotted. |
col.features |
colour for plotting features. |
col.bg |
colour for plotting the background. |
plot.range |
logical, if TRUE, range maps should be provided as a shapefile in argument range. |
range |
shapefile, species range map. |
box |
logical, includes frame with coordinates locations. |
This function plots the species occurrence with estimated biogeographical status of all points.
Plot the species occurrences with map background for visualisation
plotOcc(occ, regional = TRUE)
plotOcc(occ, regional = TRUE)
occ |
dataTable of the species occurrence. |
regional |
logical, whether the whole world should be plotted as the background or only the region adjacent to the species countries of occurrence. |
This function plots the species occurrence
occ <- getOcc("Hemitriccus mirandae") plotOcc(occ) test_data <- data.frame(sps=rep("Equus acephalus",10), lon=c(-43.2,-58.4,-56,-44,-54.5,-57.4,-60.1,-68.5,-71.3,-47.5), lat=c(-22.9,-34.6,-34.8,-20,-25.5,-25.2,-3,-32.5,-41.1,-15.5), gender=rep("female",10),head_size=rep("headless individual")) occ <- giveOcc(test_data,"sps","lon","lat") plotOcc(occ) # Plot occurrences with the whole world as background plotOcc(occ,regional=FALSE)
occ <- getOcc("Hemitriccus mirandae") plotOcc(occ) test_data <- data.frame(sps=rep("Equus acephalus",10), lon=c(-43.2,-58.4,-56,-44,-54.5,-57.4,-60.1,-68.5,-71.3,-47.5), lat=c(-22.9,-34.6,-34.8,-20,-25.5,-25.2,-3,-32.5,-41.1,-15.5), gender=rep("female",10),head_size=rep("headless individual")) occ <- giveOcc(test_data,"sps","lon","lat") plotOcc(occ) # Plot occurrences with the whole world as background plotOcc(occ,regional=FALSE)
Plot the species reference regions with map background for visualisation
plotRefReg(ref_reg)
plotRefReg(ref_reg)
ref_reg |
list containing three shapefiles derived by information supplied by GIFT. "regs" includes all the features corresponding to regions where the species has been listed as present. "regs_native" includes all the features corresponding to regions where the species has been listed as native. And "regs_alien" includes all the features corresponding to regions where the species has been listed as alien.. |
This function plots three maps of the species occurrence, showing the regions where it is present, native and alien.
A SpatialPolygonsDataFrame
Range Phalanger orientalis
data("Range_Phalanger_orientalis")
data("Range_Phalanger_orientalis")
Prepares range maps input by the user to be used as reference regions
rangeMaps( range, biogeo = "legend", native = "Extant (resident)", alien = "Introduced" )
rangeMaps( range, biogeo = "legend", native = "Extant (resident)", alien = "Introduced" )
range |
SpatialPolygonsDataFrame |
biogeo |
character, name of the column containing information on biogeographic status of features |
native |
character, entries in biogeo column representing the native range of the species |
alien |
character, entries in biogeo column representing the alien range of the species |
This function returns a list containing three shapefiles derived from information supplied by the species range map in a shapefile format. "regs" includes all the features corresponding to regions where the species has been listed as present. "regs_native" includes all the features corresponding to regions where the species has been listed as native. And "regs_alien" includes all the features corresponding to regions where the species has been listed as alien.
range_map_reference_regions <- rangeMaps(Range_Phalanger_orientalis)
range_map_reference_regions <- rangeMaps(Range_Phalanger_orientalis)
Calculates signals sent from reference regions to point records.
signalCalculation(ref_reg, pts, biogeo = TRUE)
signalCalculation(ref_reg, pts, biogeo = TRUE)
ref_reg |
a list of shapefiles containing checklist regions as "presence", "native", and "alien" categories. These can be original checklists, or checklists derived from range maps. |
pts |
data.frame containing the point records and their coordinates. |
biogeo |
logical, whether the biogeographical status indices should be calculated or not. Default is true, however at least the native reference regions must be included in the data. |
The data.frame of species occurrences with extra columns containing the location ID and presence signals for each point. If biogeo=TRUE, the data.frame also includes the nativeness and alienness indices.
A SpatialPolygonsDataFrame
signals example 1
data("signals")
data("signals")
A SpatialPolygonsDataFrame
signals example 2
data("signals_2")
data("signals_2")
A SpatialPolygonsDataFrame
signals example 3
data("signals_3")
data("signals_3")