Skip to contents

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, synonyms.list = c("Asclepias curtissii","Asclepias aceratoides", "Asclepias arenicola", "Oxypteryx arenicola", "Oxypteryx curtissii"). This parameter is required.

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, filename = "base_folder/other_folder/my_file.csv". The file path can be entered either as relative to the current working directory (example: "../my_file.csv") or as a full path. This parameter is required if write.file = TRUE.

gbif.match

A parameter to select either search by fuzzy matching of scientific name or to search by species code. For example, gbif.match = "fuzzy" will search by fuzzy match and gbif.match = "code" will search by code. This parameter is not required and is assigned "fuzzy" by default.

gbif.prov

A parameter to obtain the provider/verbatim columns from GBIF. This parameter is optional and is assigned FALSE by default.

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 idigbio.filter = TRUE will return the data frame with rows in which the name column fuzzy matches a name on the synonym list. This parameter is not required and is assigned TRUE by default.

limit

Default = 100,000 (maximum). Set limit to the number of records requested for each element in synonyms.list from each aggregator.

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:

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.

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)
#> Warning: iDigBio search will return all records where any column has a matching string to the provided scientific names.