Search for keywords on the time-series catalogs.
Arguments
- pattern
regex
pattern to search See Details and Examples.- ...
Arguments passed on to
bde_catalog_load
catalog
A single value indicating the catalogs to be updated or
"ALL"
as a shorthand. See Details.parse_dates
Logical. If
TRUE
the dates would be parsed usingbde_parse_dates()
.update_cache
Logical. If
TRUE
the requested file would be updated on thecache_dir
.cache_dir
A path to a cache directory. The directory can also be set via options with
options(bde_cache_dir = "path/to/dir")
.verbose
Logical
TRUE
orFALSE
, display information useful for debugging.
Details
Note that BdE files are only provided in Spanish, for the time being. Therefore search terms should be provided in Spanish as well in order to get search results.
This function uses base::regex()
function for finding matches on
the catalogs. You can pass regular expressions to broaden
the search.
See also
bde_catalog_load()
, base::regex()
Other catalog:
bde_catalog_load()
,
bde_catalog_update()
Examples
# \donttest{
# Simple search (needs to be in Spanish)
# !! PIB [es] == GDP [en]
bde_catalog_search("PIB")
#> # A tibble: 126 × 17
#> Nombre_de_l…¹ Numer…² Alias…³ Nombr…⁴ Descr…⁵ Tipo_…⁶ Codig…⁷ Expon…⁸ Numer…⁹
#> <chr> <dbl> <chr> <chr> <chr> <chr> <chr> <dbl> <dbl>
#> 1 DSPC102016WB… 2665111 BE_1_1… BE0101… Econom… SUMA Porcen… -2 2
#> 2 DSPC102016WB… 2665112 BE_1_1… BE0101… Econom… SUMA EUR 6 2
#> 3 DSPC102016PB… 2665115 BE_1_1… BE0101… Econom… SUMA Porcen… -2 2
#> 4 DTNSEC2010_S… 2563971 BE_1_6… BE0106… Econom… FINAL Porcen… -2 1
#> 5 DTNSEC2010_S… 2563952 BE_1_6… BE0106… Econom… FINAL Porcen… -2 1
#> 6 DTNSEC2010_S… 2563953 BE_1_6… BE0106… Econom… FINAL Porcen… -2 1
#> 7 DTNSEC2010_S… 2563954 BE_1_6… BE0106… Econom… FINAL Porcen… -2 1
#> 8 DTNSEC2010_S… 2563955 BE_1_6… BE0106… Econom… FINAL Porcen… -2 1
#> 9 DTNSEC2010_S… 2563956 BE_1_6… BE0106… Econom… FINAL Porcen… -2 1
#> 10 DTNSEC2010_S… 2563957 BE_1_6… BE0106… Econom… FINAL Porcen… -2 1
#> # … with 116 more rows, 8 more variables:
#> # Descripcion_de_unidades_y_exponente <chr>, Frecuencia_de_la_serie <chr>,
#> # Fecha_de_la_primera_observacion <date>,
#> # Fecha_de_la_ultima_observacion <date>, Numero_de_observaciones <dbl>,
#> # Titulo_de_la_serie <chr>, Fuente <chr>, Notas <chr>, and abbreviated
#> # variable names ¹Nombre_de_la_serie, ²Numero_secuencial, ³Alias_de_la_serie,
#> # ⁴Nombre_del_archivo_con_los_valores_de_la_serie, …
# More complex - Single
bde_catalog_search("Francia(.*)PIB")
#> # A tibble: 3 × 17
#> Nombre_de_la…¹ Numer…² Alias…³ Nombr…⁴ Descr…⁵ Tipo_…⁶ Codig…⁷ Expon…⁸ Numer…⁹
#> <chr> <dbl> <chr> <chr> <chr> <chr> <chr> <dbl> <dbl>
#> 1 DTNSEC2010_S0… 2563958 BE_1_6… BE0106… Econom… FINAL Porcen… -2 1
#> 2 DTNPDE2010_P0… 2563918 BE_1_7… BE0107… Econom… FINAL Porcen… -2 1
#> 3 DPUUNFKB103 906092 SI_2_1… SI_2_1… Econom… SUMA Porcen… -2 1
#> # … with 8 more variables: Descripcion_de_unidades_y_exponente <chr>,
#> # Frecuencia_de_la_serie <chr>, Fecha_de_la_primera_observacion <date>,
#> # Fecha_de_la_ultima_observacion <date>, Numero_de_observaciones <dbl>,
#> # Titulo_de_la_serie <chr>, Fuente <chr>, Notas <chr>, and abbreviated
#> # variable names ¹Nombre_de_la_serie, ²Numero_secuencial, ³Alias_de_la_serie,
#> # ⁴Nombre_del_archivo_con_los_valores_de_la_serie, ⁵Descripcion_de_la_serie,
#> # ⁶Tipo_de_variable, ⁷Codigo_de_unidades, ⁸Exponente, ⁹Numero_de_decimales
# Even more complex - Double
bde_catalog_search("Francia(.*)PIB|Italia(.*)PIB|Alemania(.*)PIB")
#> # A tibble: 9 × 17
#> Nombre_de_la…¹ Numer…² Alias…³ Nombr…⁴ Descr…⁵ Tipo_…⁶ Codig…⁷ Expon…⁸ Numer…⁹
#> <chr> <dbl> <chr> <chr> <chr> <chr> <chr> <dbl> <dbl>
#> 1 DTNSEC2010_S0… 2563953 BE_1_6… BE0106… Econom… FINAL Porcen… -2 1
#> 2 DTNSEC2010_S0… 2563958 BE_1_6… BE0106… Econom… FINAL Porcen… -2 1
#> 3 DTNSEC2010_S0… 2563959 BE_1_6… BE0106… Econom… FINAL Porcen… -2 1
#> 4 DTNPDE2010_P0… 2563913 BE_1_7… BE0107… Econom… FINAL Porcen… -2 1
#> 5 DTNPDE2010_P0… 2563918 BE_1_7… BE0107… Econom… FINAL Porcen… -2 1
#> 6 DTNPDE2010_P0… 2563919 BE_1_7… BE0107… Econom… FINAL Porcen… -2 1
#> 7 DPUUNFKB1T8 906091 SI_2_1… SI_2_1… Econom… SUMA Porcen… -2 1
#> 8 DPUUNFKB103 906092 SI_2_1… SI_2_1… Econom… SUMA Porcen… -2 1
#> 9 DPUUNFKB109 906093 SI_2_1… SI_2_1… Econom… SUMA Porcen… -2 1
#> # … with 8 more variables: Descripcion_de_unidades_y_exponente <chr>,
#> # Frecuencia_de_la_serie <chr>, Fecha_de_la_primera_observacion <date>,
#> # Fecha_de_la_ultima_observacion <date>, Numero_de_observaciones <dbl>,
#> # Titulo_de_la_serie <chr>, Fuente <chr>, Notas <chr>, and abbreviated
#> # variable names ¹Nombre_de_la_serie, ²Numero_secuencial, ³Alias_de_la_serie,
#> # ⁴Nombre_del_archivo_con_los_valores_de_la_serie, ⁵Descripcion_de_la_serie,
#> # ⁶Tipo_de_variable, ⁷Codigo_de_unidades, ⁸Exponente, ⁹Numero_de_decimales
# Search a sequential code: Exact match
# Note that this series (sequential code) appears on several tables
bde_catalog_search("^3779313$")
#> # A tibble: 2 × 17
#> Nombre_de_la…¹ Numer…² Alias…³ Nombr…⁴ Descr…⁵ Tipo_…⁶ Codig…⁷ Expon…⁸ Numer…⁹
#> <chr> <dbl> <chr> <chr> <chr> <chr> <chr> <dbl> <dbl>
#> 1 DSPC102016VB1… 3779313 BE_2_1… BE0201… CNE. B… SUMA Porcen… 0 2
#> 2 DSPC102016VB1… 3779313 SI_2_1… SI_2_1… CNE. B… SUMA Porcen… 0 2
#> # … with 8 more variables: Descripcion_de_unidades_y_exponente <chr>,
#> # Frecuencia_de_la_serie <chr>, Fecha_de_la_primera_observacion <date>,
#> # Fecha_de_la_ultima_observacion <date>, Numero_de_observaciones <dbl>,
#> # Titulo_de_la_serie <chr>, Fuente <chr>, Notas <chr>, and abbreviated
#> # variable names ¹Nombre_de_la_serie, ²Numero_secuencial, ³Alias_de_la_serie,
#> # ⁴Nombre_del_archivo_con_los_valores_de_la_serie, ⁵Descripcion_de_la_serie,
#> # ⁶Tipo_de_variable, ⁷Codigo_de_unidades, ⁸Exponente, ⁹Numero_de_decimales
# }