The vast majority of species occurrence information available, via ‘big data’ aggregators as GBIF are georeferenced point locations consisting of geographic coordinates. However, most methods for ancestral area estimation require species occurrences in a limited number of discrete geographic units. A manual classification of species based on expert knowledge or graphical-user-interface based GIS software are limited in the amount of data that can be processed and often hard to reproduce. SpeciesgeocodeR implements an easy-to-use function to classify species occurrence to discrete areas, accounting for issues in data quality. You can find detailed tutorials on the software here and articles disrobing the method here and here.
After this exercise you will be able to assign species occurrences to predefined areas in an automated way, taking into account caveats on data quality.
read_csv
, SpGeoCod
, WwfLoad
)SpGeoCod
)WriteOut
)SpGeoCod
)require(speciesgeocodeR)
require(tidyverse)
require(rgdal)
# load data
dat <- read_csv("inst/occurrence_records_clean.csv") %>% data.frame()
# Load Olson et al 2001 biomes
biom <- WWFload(x = "inst")
names(biom)
# Classify species
class <- SpGeoCod(x = dat, y = biom, areanames = "BIOME")
# summary graphs
WriteOut(class, type = "graphs")
# summary tables
WriteOut(class, type = "stats")
# Per species maps, dont do this for very large groups with more than 100
# species WriteOut(class, type = 'maps')
# BioGeoBEARS
WriteOut(class, type = "BioGeoBEARS")
It might be advisable to only classify a species to a habitat if more than one or two occurrences are in this habitat. This is especially the case, if the quality of the occurrence data is unclear. You can use the òcc.thresh
argument of SpGeoCod
for this.
# At least 20% of the records
class_thresh <- SpGeoCod(x = dat, y = biom, areanames = "BIOME", occ.thresh = 10)
class$polygon_table
class_thresh$polygon_table