scb_cache: Cached ssd database

Description Usage Format Details Source

Description

A data.frame containing condensed information on all directories, subdirectories, and tables in the "ssd" database at SCB www.scb.se. ssd is the main database for national statistics, and, currently, the only one accessible through the API.

Usage

1

Format

A data frame with approximately 2800 rows and 10 columns:

id

ID path to use to query directory or table

depth

1 = highest level directory in cache, incremented for each subdirectory

type

l for directory, t for table

name

Name of directory / table

updated

Last time table was updated

var_desc

Variables present in table

val_desc

Values present in table

date_start

Oldest entry in table

date_end

Most recent entry in table

Details

When compiled in March 2019, the highest level directory had information on:

The cache is created by running scb_create_cache, which recursively calls scb_list. 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.

In a future iteration of this table, the intention is to flatten the structure to store tables on the same rows as their directories. It will also include a new column containing information on when the table as last updated.

Source

www.scb.se via API through scb_create_cache


olhmr/rscb documentation built on May 15, 2019, 10:40 p.m.