knitr::opts_chunk$set( collapse = TRUE, tidy = "styler", comment = "#>", warning = FALSE, message = FALSE, dev = "ragg_png", dpi = 300, out.width = "100%" )
The following table shows the series available on the catalog (Last update:
r format(Sys.Date(),"%d-%B-%Y")
).
Use the sequential number to load a single series (see Example below):
library(tidyBdE) library(ggplot2) library(dplyr) library(tidyr) series <- bde_catalog_load() # Clean series_clean <- series %>% filter(!is.na(Numero_secuencial)) %>% select( Numero_secuencial, Descripcion_de_la_serie, Titulo_de_la_serie, Tipo_de_variable, Fecha_de_la_primera_observacion, Fecha_de_la_ultima_observacion, Frecuencia_de_la_serie, Fuente ) %>% as_tibble() library(reactable) reactable(series_clean, filterable = TRUE, searchable = TRUE, resizable = TRUE, showPageSizeOptions = TRUE, striped = TRUE, defaultColDef = colDef( minWidth = 200, html = TRUE, align = "left", vAlign = "center" ), paginationType = "jump", defaultPageSize = 5, compact = TRUE, elementId = "bde-series" )
For searching and extracting a specific serie, see the full workflow:
library(tidyBdE) library(tidyverse) # GDP France fr <- bde_catalog_search("Francia(.*)PIB") # Show table on vignette fr %>% select(Numero_secuencial, Descripcion_de_la_serie) %>% knitr::kable() # In this case we want to extract the first serie # See tidyverse style fr %>% # Select id select(Numero_secuencial) %>% # of first obs slice(1) %>% # convert to number as.double() %>% # And load it bde_series_load() # See the metadata fr %>% # Select id select(Numero_secuencial) %>% # of first obs slice(1) %>% # convert to number as.double() %>% # And load the metadata bde_series_load(extract_metadata = TRUE) %>% # To table on the vignette knitr::kable()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.