View source: R/lib_data_loader.R
| resolve_via_ckan | R Documentation |
Queries the CKAN package_show endpoint recorded in a provenance
object and returns the URL of the first resource whose name matches the
provenance's name-match pattern. CKAN powers data.ontario.ca,
data.gov.uk, data.gov, and most government open-data portals, so this
recovers the current download URL even if the underlying resource UUID
has been replaced.
resolve_via_ckan(provenance)
provenance |
A provenance list as returned by |
The matched resource URL as a character string, or NULL if
the endpoint is missing, the request fails, CKAN reports failure, or
no resource name matches.
# Missing fields return NULL rather than erroring:
resolve_via_ckan(list())
prov <- list(
dataset = list(ckan_api_endpoint = paste0(
"https://data.ontario.ca/api/3/action/package_show",
"?id=ontario-public-library-statistics")),
resource = list(name_match_pattern = "2014")
)
resolve_via_ckan(prov)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.