knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(dataobservatory, quietly = TRUE) data("small_population") small_population_dataset <- dataset (x= small_population, dataset_code = "small_population_total", dataset_title = "Population of Small European Countries", freq = "A", unit = "NR", unit_name = "number")
The codebook
S3 class (not yet fully documented and does not have yet and independent constructor) records the statistical processing metadata of a dataset. It as a print method.
It contains a full codebook following SDMX statistical metadata codelist standards, furthermore, it records the Session Information of all processing steps, and adds to the descriptive metadata the R packages or software code that generated the results.
small_population_codebook <- codebook_dataset (small_population_dataset) is.codebook(small_population_codebook) small_population_codebook
For example, the annual observations follow the SDMX Code List for Frequency 2.1 (CL_FREQ)) definition, and they can be translated to the ISO 8106
time metadata standard, too.
add_frequency("A", "list")
The add_obs()
implements the SDMX Code List for Observation Status 2.2 (CL_OBS_STATUS) defintiion for observation status.
Furthermore, with Estimated values and Imputed values, the software code and computational environment information can be recoded (with add_related_items()
).
add_obs("E", "list")
Only Eurostat uses hundreds of codelists, most of them for various measurement information. Currently the unit information is not validated in the package. However, this is not a problem when data is imported from other statistical services, because they apply appropriate unit information.
add_unit("M_EUR", "Million euros", admin_format = 'list')
consolidated_codebook <- codebook() is.codebook(consolidated_codebook) print(consolidated_codebook)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.