Learn R Programming

bbk (version 0.11.0)

cnb_data: Fetch Czech National Bank (CNB) ARAD time series data

Description

Retrieve time series observations from the CNB ARAD database. ARAD is the CNB's full statistical database, covering monetary, financial-market, balance-of-payments, and government finance statistics. Access requires an API key, which can be generated from a free account at https://www.cnb.cz/arad/.

Usage

cnb_data(
  indicator_id = NULL,
  set_id = NULL,
  base_id = NULL,
  selection_id = NULL,
  start_period = NULL,
  end_period = NULL,
  snapshot_id = NULL,
  api_key = cnb_arad_key()
)

Value

A data.table::data.table() with columns:

date

The observation period

indicator_id

The indicator identifier

snapshot_id

The snapshot identifier, or NA for non-snapshot data

value

The observation value

Arguments

indicator_id

(NULL | character())
One or more indicator identifiers to retrieve (e.g. "SMV5M603"). Exactly one of indicator_id, set_id, base_id, or selection_id must be provided.

set_id

(NULL | character(1))
A set ("sestava") identifier, returning all of its indicators.

base_id

(NULL | character(1))
A base identifier, returning all of its indicators.

selection_id

(NULL | character(1))
The identifier of a named selection ("My selections") created in your ARAD account.

start_period

(NULL | character(1) | Date(1))
Start of the period to retrieve. If NULL, no start restriction is applied. Default NULL.

end_period

(NULL | character(1) | Date(1))
End of the period to retrieve, in the same format as start_period. Default NULL.

snapshot_id

(NULL | character())
One or more snapshot ids to retrieve historical vintages, or "ALL" for every snapshot. If NULL, the current (non-snapshot) data is returned. See cnb_snapshots(). Default NULL.

api_key

(character(1))
API key to use for the request. Defaults to the value returned by cnb_arad_key(), which reads from the CNB_ARAD_KEY environment variable.

See Also

Other data: bbk_data(), bbk_series(), bde_data(), bde_latest(), bdf_codelist(), bdf_data(), bdf_dataset(), bdp_data(), bis_data(), boc_data(), boe_data(), boj_data(), cnb_czeonia(), cnb_fx_other_rates(), cnb_fx_rates(), cnb_pribor(), ecb_data(), nbp_fx_rates(), nbp_gold(), nob_data(), onb_data(), snb_data(), srb_cross_rates(), srb_data()

Examples

Run this code
if (FALSE) {
# a single indicator over 24 months
cnb_data("SMV5M603", start_period = "2023-01-01")

# every indicator in a set
cnb_data(set_id = "1058")
}

Run the code above in your browser using DataLab