View source: R/govcan_dl_resources.R
govcan_dl_resources | R Documentation |
Download resources attached to a specific record or (i.e. a CKAN package) or to a stack of packages.
govcan_dl_resources(resources, excluded, included, path, id_as_filename, ...) ## S3 method for class 'ckan_resource' govcan_dl_resources( resources, excluded = NULL, included = NULL, path = ".", id_as_filename = FALSE, ... ) ## S3 method for class 'ckan_resource_stack' govcan_dl_resources(resources, ...) ## S3 method for class 'character' govcan_dl_resources(resources, ...) ## S3 method for class 'ckan_package' govcan_dl_resources(resources, ...) ## S3 method for class 'ckan_package_stack' govcan_dl_resources(resources, ...)
resources |
An object of class |
excluded |
(vector of characters) Files of this format(s) will not be
downloaded ( |
included |
(vector of characters) Only the files of this format(s) will
be downloaded ( |
path |
(character) name indicating where to store the data (default is the current working directory). |
id_as_filename |
(logical) Use the resource identifier as file name. This is particularly useful when two different resources have the same filename. |
... |
Curl arguments passed on to crul::verb-GET (see |
File names are handled internally.
A tibble of the download metadata (file id, package id, url, download path, format, storage location, associated data).
ckan_resource
: Method for ckan_resource objects.
ckan_resource_stack
: Method for ckan_resource_stack
objects.
character
: Method for character
objects.
ckan_package
: Method for ckan_package
objects.
ckan_package_stack
: Method for ckan_package_stack
objects.
## Not run: id <- "b7ca71fa-6265-46e7-a73c-344ded9212b0" dir <- tempdir(check = TRUE) res <- govcan_dl_resources(id, path = dir) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.