View source: R/OccurrenceCollection.R
OccurrenceCollection | R Documentation |
Takes a list of species and collects occurrence data from GBIF (Global Biodiversity Information Facility).
Acts as a wrapper for rgbif::occ_search
; however, this function is much more efficient for a large
number of species. It also checks the taxonomy of the given species list against the GBIF taxonomy,
renaming or merging taxa if necessary. Furthermore, this function vets the occurrence data, removing
occurrence points that are of insufficient quality for species distribution modelling.
Finally, OccurrenceCollection()
provides the number of occurrences found within given training and study areas.
OccurrenceCollection(spplist, output, trainingarea = NA, studyarea = NA)
spplist |
a vector of scientific names, using GBIF taxonomy. Names can be species or subspecies. |
output |
A full directory name where the downloaded species occurrences will be written to. |
trainingarea |
Extent object, or vector of desired training extent in form |
studyarea |
(optional) Extent object, or vector of the area that the SDM will be projected on in
form |
Writes .csv files of GBIF occurrences to a directory provided by output
. If any species failed
(for example, the scientific name was not found in the search or no occurrences exist within a provided trainingarea
),
another .csv file is written out in the same folder with the names of the species that failed. In addition,
a dataframe is returned by the function that contains the high taxonomy of each species and the nubmer of
occurrences found within the trainingarea
and, optionally, the studyarea
.
List of occurrences removed by OccurrenceCollection
:
Fossil specimens (mitigates the effect of long-term climiatic changes on the SDM)
"cdiv": Coordinate Invalid
"cdout": Coordinate Out of Range
"cdrepf": Coordinate Reprojection Failed
"cdreps": Coordinate Reprojection Suspicious
"gdativ": Geodetic Datum Invalid
"preneglat": Presumed Negated Latitude
"preneglon": Presumed Negated Longitude
"preswcd": Presumed Swapped Coordinates
"txmatnon": No Taxon Match
"zeocd": Exact 0/0 Coordinate.
Further vetting may be done by hand.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.