Skip to contents

download_csv() downloads the csv for a table

Usage

download_csv(
  tablename,
  startyear = "",
  endyear = "",
  ...,
  genesis_db = "de",
  save = TRUE
)

Arguments

tablename

name of the table to retrieve.

startyear

only retrieve values for years equal or larger to startyear. Default: "".

endyear

only retrieve values for years smaller or equal to endyear. Default: "".

...

further parameters supplied as URL parameter in the GENESIS database call

genesis_db

name of the database (default: 'de').

save

write string to a text file (default: TRUE)

Details

Downloads the csv file either to the working directory getwd() or outputs it as a string. This is an alternative approach to the retrieve_*() functions. This is designed for https://www-genesis.destatis.de/genesis/online as it does not require a login. It might not work as expected for the other databases.

Examples

 if (FALSE) {

 download_csv("12411-0004.csv")

 }