get_taxa.Rd
The function downloads and returns a list or dataframe containing a taxonomic
description for each requested species where a row corresponds to an
individual species. The function returns a dataframe for all species if no
parameters are specified. The function filters returned taxa record by
attributes corresponding to atlas table columns specified as parameters
(ie. id
, scientific_name
, col
, gbif
, etc
)
with accepted values either being scalar or vector for single or multiple
records
get_taxa(id = NULL, scientific_name = NULL, match_name = NULL, ...)
Optional. integer
scalar or vector. Returns a dataframe for the
taxon with the specified id
Optional. char
scalar or vector. Returns a dataframe
for the taxon with the specified scientific name
Optional. char
scalar or vector. Returns a dataframe
for the taxon with the specified scientific name or vernacular name.
Vernacular names in french or english are accepted.
Optional. scalar or vector. Returns a dataframe filtered by the
atlas taxa
table columns specified as parameter
tibble
with rows associated with Atlas data object
# Returns all available taxa records in atlas
taxa <- get_taxa()
#> Error in { response <- postgrest_get_page(url = url, query = query, header = header, page = page, limit = .page_limit) postgrest_stop_if_err(response) postgrest_resp_to_data(response)}: task 3 failed - "Failed to perform HTTP request.
#> Caused by error in `curl::curl_fetch_memory()`:
#> ! OpenSSL SSL_read: error:0A00010B:SSL routines::wrong version number, errno 0"
# Returns all taxa filtered by the column id values
taxa <- get_taxa(id = c(188, 201, 294, 392))
# Returns taxa record for the scientific name
taxa <- get_taxa(scientific_name = "Cyanocitta cristata")
# Return taxa filtered by the atlas table column `col`
results <- get_taxa(col = 35520954)
#> Error in httr2::req_perform(httr2::req_url_query(httr2::req_headers(httr2::request(url), !!!header), !!!query)): HTTP 400 Bad Request.