cbs_get_datasets {cbsodataR}R Documentation

Retrieve a data.frame with requested cbs tables

Description

cbs_get_datasets by default a list of all tables and all columns will be retrieved. You can restrict the query by supplying multiple filter statements or by specifying the columns that should be returned.

Usage

cbs_get_datasets(
  catalog = "CBS",
  convert_dates = TRUE,
  select = NULL,
  verbose = FALSE,
  cache = TRUE,
  base_url = getOption("cbsodataR.base_url", BASE_URL),
  ...
)

Arguments

catalog

which set of tables should be returned? cbs_get_catalogs() or supply NULL for all tables.

convert_dates

convert the columns with date-time information into DateTime (default TRUE)

select

character columns to be returned, by default all columns will be returned.

verbose

logical prints the calls to the webservice

cache

logical should the result be cached?

base_url

optionally specify a different server. Useful for third party data services implementing the same protocol.

...

filter statement to select rows, e.g. Language="nl"

Details

Note that setting catalog to NULL results in a datasets list with all tables including the extra catalogs.

Examples

if (interactive()){
  # retrieve the datasets in the "CBS" catalog
  ds <- cbs_get_datasets()
  ds[1:5, c("Identifier", "ShortTitle")]
  
  # retrieve de datasets in the "AZW" catalog
  ds_azw <- cbs_get_datasets(catalog = "AZW")
  
  # to retrieve all datasets of all catalogs, supply "NULL"
  ds_all <- cbs_get_datasets(catalog = NULL)
}

[Package cbsodataR version 1.0.1 Index]