cbs4_download: Download observations and metadata

View source: R/cbs4_download.R

cbs4_downloadR Documentation

Download observations and metadata

Description

Download observations and metadata to a directory. This function is the working horse for cbs4_get_data() and cbs4_get_observations() and has many of the same options. This function is useful if you do not want to load an entire dataset into memory, but just download the data and metadata in csv format.

Usage

cbs4_download(
  id,
  download_dir = id,
  ...,
  query = NULL,
  catalog = "CBS",
  show_progress = interactive() && !verbose,
  sep = ",",
  verbose = getOption("cbsodata4.verbose", FALSE),
  base_url = getOption("cbsodata4.base_url", BASEURL4)
)

Arguments

id

Identifier of publication

download_dir

directory where files are to be stored

...

optional selection statement to retrieve a subset of the data.

query

optional odata4 query in odata syntax (overwrites any specification in ...)

catalog

Catalog to download from

show_progress

logical if TRUE downloading shows a progress bar. Cannot be used together with verbose=TRUE

sep

seperator to be used in writing the data

verbose

Should messages be printed...

base_url

Possible other website which implements same protocol.

Value

metadata of table (invisible()).

See Also

Other data-download: cbs4_get_data(), cbs4_get_observations()


statistiekcbs/cbsccb documentation built on April 8, 2022, 2:38 a.m.