Helper function to download all records for a given data.un.org query

single_download_undata_table(
  query,
  output_path,
  bow,
  record_limit = 1e+05,
  downloader_url = "http://data.un.org/Handlers/DownloadHandler.ashx"
)

Arguments

query

[list(1)]
Query with filters, columns, sort order arguments specified as returned by undata_url_to_query.

output_path

[character(1)]
Full path and file name to save downloaded csv file to.

bow

host introduction object of class polite, session created by bow() or nod()

record_limit

[numeric(1)]
Upper limit of records/rows that you can download at once.

downloader_url

The base url of the data.un.org site download interfact. Default is 'http://data.un.org/Handlers/DownloadHandler.ashx'.

Value

[character(1)] invisibly returns output_pathwhere downloaded file is saved.