Resolve a Download URL via CKAN package_search
Source:R/lib_data_loader.R
resolve_via_ckan_search.RdFallback for resolve_via_ckan() when the dataset slug has changed.
Derives the CKAN portal base URL from the provenance's package_show
endpoint, runs a package_search query (from resource$search_query,
or derived from the name-match pattern), and returns the URL of the
first matching resource, preferring CSV format when specified.
Arguments
- provenance
A provenance list as returned by
load_provenance(). Usesresource$search_query,resource$name_match_pattern,resource$format, anddataset$ckan_api_endpoint.