This function uses the rgbif
package to get occurrence data from the Global Biodiversity Information Facility (GBIF) API.
Usage
GetOccs(
Species,
WriteFile = T,
continent = NULL,
country = NULL,
limit = 10000,
Log = T,
...
)
Arguments
- Species
A vector containing the species to query.
- WriteFile
Logical. If
TRUE
, the occurrence data will be written to theOccs
folder. IfFALSE
, the occurrence data will be returned in a list.- continent
what contintent are the occurrences downloaded from
- country
character, The 2-letter country code (ISO-3166-1) in which the occurrence was recorded.
- limit
maximum number of occurrences downloaded
- Log
Logical. If
TRUE
, a log file will be created with information on the progress of the function.- ...
Additional arguments to be passed to the
occ_data
function.
Value
If WriteFile = TRUE
, this function does not return anything. If WriteFile = FALSE
, a list containing the occurrence data for each species is returned.
Examples
# Get occurrence data for species in FinalSpeciesList
# \donttest{
Presences <- SDMWorkflows::GetOccs(Species = c("Abies concolor", "Canis lupus"), WriteFile = FALSE)
#> Starting species 1
#> 1 of 2 ready! 2023-05-07 20:15:15.938956
#> Starting species 2
#> 2 of 2 ready! 2023-05-07 20:15:51.201106
# }