get_dyntaxa_dwca: Download and Read Darwin Core Archive Files from Dyntaxa

View source: R/dyntaxa_api_functions.R

get_dyntaxa_dwcaR Documentation

Download and Read Darwin Core Archive Files from Dyntaxa

Description

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.

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.

Value

A tibble containing the data from the specified CSV file.

Examples

## Not run: 
# 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")

## End(Not run)


sharksmhi/SHARK4R documentation built on Jan. 9, 2025, 5:15 p.m.