View source: R/cbs4_get_datasets.R
| cbs4_get_datasets | R Documentation |
Get the available datasets from open data portal statline.
cbs4_get_datasets(
catalog = "CBS",
convert_dates = TRUE,
verbose = getOption("cbsodata4.verbose", FALSE),
base_url = getOption("cbsodata4.base_url", BASEURL4)
)
cbs4_get_toc(
catalog = "CBS",
convert_dates = TRUE,
verbose = getOption("cbsodata4.verbose", FALSE),
base_url = getOption("cbsodata4.base_url", BASEURL4)
)
catalog |
only show the datasets from that catalog. If |
convert_dates |
Converts date columns in Date-Time type (in stead of |
verbose |
Should the url request be printed? |
base_url |
base url of the CBS OData 4 API |
Setting the catalog to NULL will return all
data.frame() with publication metadata of tables.
the datasets are downloaded only once per R session and cached. Subsequent calls to
cbs4_get_datasets will use the results of the first call.
Other datasets:
cbs4_get_catalogs()
if (interactive()){
# retrieve the main datasets (catalog = "CBS")
ds <- cbs4_get_datasets()
print(nrow(ds))
# see cbs4_get_catalogs() to retrieve all catalogs
ds_asd <- cbs4_get_datasets(catalog = "CBS-asd")
print(nrow(ds_asd))
ds_all <- cbs4_get_datasets(catalog = NULL)
print(nrow(ds_all))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.