Skip to contents

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", 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".

verbose

A logical value indicating whether to show download progress. Defaults to TRUE.

Value

A tibble containing the data from the specified CSV file.

Details

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.

Examples

if (FALSE) { # \dontrun{
# Provide your Dyntaxa API subscription key
subscription_key <- "your_subscription_key"

# Download and read the Taxon.csv file
taxon_data <- get_dyntaxa_dwca(subscription_key, file_to_read = "Taxon.csv")
} # }