Skip to contents

Mirrors the Python fetch_package_csvs helper: pulls the package metadata, walks its resources list, and downloads each CSV / TSV into a named list of data.frames keyed by resource name (falling back to url, then id). Non-CSV / TSV resources are skipped; individual download failures are captured as a single-row error data.frame keyed _failed_<name> so the overall fetch still returns the successful ones.

Usage

morie_ingest_ckan_fetch_package_csvs(
  portal,
  package_id,
  api_key = NULL,
  user_agent = .MORIE_CKAN_DEFAULT_UA,
  timeout = .MORIE_CKAN_DEFAULT_TIMEOUT
)

Arguments

portal

Base URL of the CKAN portal.

package_id

Package id or slug.

api_key

Optional CKAN API key.

user_agent

User-Agent header sent with the request.

timeout

HTTP timeout in seconds.

Value

A named list of data.frames.