This function retrieves the hierarchical tree structure of indicators from the ARAD API, showing how indicators are organized in a tree format with categories and subcategories.
Usage
arad_indicators_tree(
set_id = NULL,
indicator_id_list = NULL,
selection_id = NULL,
api_key = NULL,
base_url = "https://www.cnb.cz/aradb/api/v1",
encoding = "windows-1250"
)
Arguments
- set_id
Character, set ID to get tree structure for a specific data set (required unless indicator_id_list or selection_id is provided)
- indicator_id_list
Character vector, specific indicator IDs to retrieve tree structure for (required unless set_id or selection_id is provided). Will be converted to comma-separated string.
- selection_id
Character, ID of a named selection created in ARAD user account (required unless set_id or indicator_id_list is provided)
- api_key
API key for ARAD access. If NULL, uses ARAD_API_KEY environment variable
- base_url
Base URL for the ARAD API
- encoding
Character encoding for the response (default "windows-1250")
Examples
if (FALSE) { # \dontrun{
# Get full indicator tree
tree <- arad_indicators_tree()
# Get tree structure for a specific data set
monetary_tree <- arad_indicators_tree(set_id = "MONETARY_SET")
# Get tree structure for specific indicators
specific_tree <- arad_indicators_tree(indicator_id_list = "SRUMD08402")
multiple_tree <- arad_indicators_tree(indicator_id_list = c("SRUMD08402", "SRUMD08403"))
# Get tree structure from a named selection
selection_tree <- arad_indicators_tree(selection_id = "my_selection")
} # }