get_dyntaxa_records: Get taxonomic information from SLU Artdatabanken API for...

View source: R/dyntaxa_api_functions.R

get_dyntaxa_recordsR Documentation

Get taxonomic information from SLU Artdatabanken API for specified taxon IDs

Description

This function queries the SLU Artdatabanken API (Dyntaxa) to retrieve taxonomic information for the specified taxon IDs. It constructs a request with the provided taxon IDs, sends the request to the SLU Artdatabanken API, and processes the response to return taxonomic information in a data frame.

Usage

get_dyntaxa_records(taxon_ids, subscription_key)

Arguments

taxon_ids

A vector of numeric taxon IDs (Dyntaxa ID) for which taxonomic information is requested.

subscription_key

A character string containing the subscription key for accessing the SLU Artdatabanken API. A key is provided for registered users at Artdatabanken.

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 data frame containing taxonomic information for the specified taxon IDs. Columns include taxonId, names, category, rank, isRecommended, and parentTaxonId.

See Also

SLU Artdatabanken API Documentation

Examples

## Not run: 
# Get taxonomic information for taxon IDs 238366 and 1010380
taxon_info <- get_dyntaxa_records(c(238366, 1010380), "your_subscription_key")
print(taxon_info)

## End(Not run)



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