
Download and Read Darwin Core Archive Files from Dyntaxa
Source:R/dyntaxa_api_functions.R
get_dyntaxa_dwca.Rd
This function downloads a complete Darwin Core Archive (DwCA) of Dyntaxa from the SLU Artdatabanken API, extracts the archive, and reads the specified CSV file into R.
Usage
get_dyntaxa_dwca(
subscription_key,
file_to_read = "Taxon.csv",
force = FALSE,
verbose = TRUE
)
Arguments
- subscription_key
A string containing your API subscription key for the Dyntaxa Taxon Service.
- file_to_read
A string specifying the name of the CSV file to read from the extracted archive. Allowed options are:
"Reference.csv"
,"SpeciesDistribution.csv"
,"Taxon.csv"
, or"VernacularName.csv"
. Defaults to"Taxon.csv"
.- force
A logical value indicating whether to force a fresh download of the archive, even if a cached copy is available. Defaults to
FALSE
.- verbose
A logical value indicating whether to show download progress. Defaults to
TRUE
.
Details
By default, the archive is downloaded only once per R session. On subsequent calls,
the function reuses the cached copy of the extracted files to avoid repeated downloads.
Use the force
parameter to re-download the archive if needed.
Note: Please review the API conditions
and register for access before using the API. Data collected through the API
is stored at SLU Artdatabanken. Please also note that the authors of SHARK4R
are not affiliated with SLU Artdatabanken.