Learn R Programming

bbk (version 0.8.0)

bde_data: Fetch Banco de España (BdE) data

Description

Retrieve time series data from the BdE statistics API.

Usage

bde_data(key, time_range = NULL, lang = "en")

Value

A data.table::data.table() with the requested data.

Arguments

key

(character())
The series keys to query.

time_range

(NULL | character(1) | integer(1))
The time range for the data. Can be an annual range (e.g., 2024) or a frequency-based code:

  • Daily frequency (D): "3M" (last 3 months), "12M", "36M"

  • Monthly frequency (M): "30M", "60M", "MAX" (entire series)

  • Quarterly frequency (Q): "30M", "60M", "MAX"

  • Annual frequency (A): "60M", "MAX"

If NULL (default), returns the smallest range for the series frequency (e.g., "30M" for monthly series).

lang

(character(1))
Language to query, either "en" or "es".

Details

You can search for the series codes in the BIEST application or in the tables published by the Banco de España.

See Also

Other data: bbk_data(), bbk_series(), bdf_codelist(), bdf_data(), bdf_dataset(), boc_data(), boe_data(), ecb_data(), onb_data(), snb_data()

Examples

Run this code
# \donttest{
bde_data("D_1NBAF472", time_range = "30M")
bde_data(c("DTNPDE2010_P0000P_PS_APU", "DTNSEC2010_S0000P_APU_SUMAMOVIL"), time_range = "MAX")
bde_data("DEEQ.N.ES.W1.S1.S1.T.B.G._Z._Z._Z.EUR._T._X.N.ALL", time_range = 2024)
# }

Run the code above in your browser using DataLab