Description Usage Arguments Details Value Examples
Creates a local and condensed copy of the given database at www.scb.se, for the given language, with the option of starting at a particular ID path to only cache a subset of the data.
1 | scb_create_cache(lang = "en", database_id = "ssd", initial_id = "")
|
lang |
Supported languages: "en" English |
database_id |
Supported databases: "ssd" |
initial_id |
From where to start caching: default top level |
The function is only tested with the "ssd" database, as that is the only one
that can be queried through this package and the API as of March 2019. The
output is condensed to reduce file size - the full structure can be seen in
scb_cache
or by loading "data/scb_cache.rda".
The function recursively calls scb_list
through
add_directory_to_cache
. For each directory, the ID path
and text description is stored. For tables, in addition to the ID path and
text description, the variables, values, and date range present in the table
is also stored.
Data.frame containing id, depth, type, name, variable and value descriptions, and date range for each directory, subdirectory, and table in the database
1 2 3 4 5 | ## Not run:
scb_cache <- scb_create_cache(lang = "en")
scb_AM0101_cache <- scb_create_cache(lang = "en", initial_id = "AM/AM0101")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.