gators_download {gatoRs} | R Documentation |
Download - Download specimen data from both iDigBio and GBIF
Description
The gators_download()
function downloads data from GBIF and iDigBio for your desired species.
Usage
gators_download(
synonyms.list,
write.file = FALSE,
filename = NA,
gbif.match = "fuzzy",
gbif.prov = FALSE,
idigbio.filter = TRUE,
limit = 1e+05
)
Arguments
synonyms.list |
A list of scientific names including the accepted scientific name and any synonyms for your desired species. For example, |
write.file |
A parameter to choose whether to produce a .csv file containing search results. This parameter is not required and is assigned FALSE by default. |
filename |
The path and file name for the retrieved data. Note that this parameter should include the ".csv"
extension as well. For example, |
gbif.match |
A parameter to select either search by fuzzy matching of scientific name or to search by species code.
For example, |
gbif.prov |
A parameter to obtain the provider/verbatim columns from GBIF. This parameter is optional
and is assigned |
idigbio.filter |
A parameter to remove less relevant search results from iDigBio. Based on the search input, results may
include data points for a different species that mention the desired species in the locality information, for example.
Choosing |
limit |
Default = 100,000 (maximum). Set limit to the number of records requested for each element in synonyms.list from each aggregator. |
Details
With gators_download()
you can obtain biodiversity records for your species of interest from both GBIF and iDigBio.
This function is innovative in how it searches iDigBio. Unlike spocc::occ()
, we do not query the iDigBio API using
the scientific name field, as this will only return exact matches.
Instead, we designed a “pseudo-fuzzy match” to search all fields for
partial matches to the supplied scientific names.
This function uses the get_idigbio()
, get_gbif()
, fix_columns()
, fix_names()
, and filter_fix_names()
functions.
This function requires packages magrittr, rgbif, dplyr, ridigbio, and stringr.
Value
Returns a data frame and writes a csv file as specified in the input. This csv file will contain search results for the desired species from the GBIF and iDigBio databases. The columns are as follows:
ID (contains unique IDs defined from GBIF or iDigBio)
aggregator (either GBIF or iDigBio)
Examples
df <- gators_download(synonyms.list = c("Galax urceolata", "Galax aphylla"), limit = 10)
df <- gators_download(synonyms.list = "Galax urceolata", gbif.match = "code",
idigbio.filter = FALSE, limit = 10)