Description Usage Arguments Value Examples
View source: R/govcan_get_record.R
This function wraps ckanr::package_show()
to access a specific record
(or package, in CKAN terms) given its unique id
1 2 3 4 5 6 | govcan_get_record(
record_id,
format_resources = FALSE,
only_resources = FALSE,
... = NULL
)
|
record_id |
(character) The id of the wanted dataset, which can be found with a search using govcan_search, or on https://open.canada.ca/en. The id is of the form "4a2929ce-d6b1-49b0-b520-63be0859c552" |
format_resources |
(logical) Whether the function should return a formatted output
of the resources as a tibble or an unformatted list of resources (default is |
only_resources |
(logical) Whether the function should return only the resources from the record (list of files available for download). Resources can also be accessed with govcan_show_ressources |
... |
More arguments to be passed on to |
If only_resources is TRUE
, will return only the list of data files (resources)
associated with the record queried else it will return all the output of the CKAN query.
If format_resources is TRUE
, the resources are formatted to a tibble.
1 2 3 4 5 | ## Not run:
pid <- "b7ca71fa-6265-46e7-a73c-344ded9212b0"
pkg <- govcan_get_record(pid)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.