get_dyntaxa_children_hierarchy: Get children hierarchies for specified taxon IDs from SLU...

View source: R/dyntaxa_api_functions.R

get_dyntaxa_children_hierarchyR Documentation

Get children hierarchies for specified taxon IDs from SLU Artdatabanken API (Dyntaxa)

Description

This function queries the SLU Artdatabanken API (Dyntaxa) to retrieve children taxon hierarchy 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 a data frame of taxon children.

Usage

get_dyntaxa_children_hierarchy(
  taxon_ids,
  subscription_key,
  levels = 1,
  main_children = TRUE,
  verbose = TRUE
)

Arguments

taxon_ids

A vector of numeric taxon IDs for which children taxon IDs are 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.

levels

Integer. Default is 1

main_children

Logical. Default is TRUE.

verbose

Logical. Default is 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 data frame containing children taxon information corresponding to the specified taxon IDs.

See Also

SLU Artdatabanken API Documentation

Examples

## Not run: 
# Get children taxon hierarchy for taxon IDs 1010608 and 5000062
children_hierarchy <- get_dyntaxa_children_hierarchy(c(1010608, 5000062), "your_subscription_key")
print(children_hierarchy)

## End(Not run)



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