Download files from an Open Data Portal, assuming it uses the CKAN API.

get_odp_data(
  portal_url = "https://data.cnra.ca.gov",
  pkg_id,
  fnames,
  parse_fun,
  ...,
  verbose = TRUE
)

Arguments

portal_url

The base URL of the portal, e.g. "data.cnra.ca.gov".

pkg_id

The package identifier.

fnames

A vector of file names in the package to download. Supports regex.

parse_fun

A function to parse datasets. Default assumes that all files in fnames can be parsed using readr::read_csv().

...

Additional arguments to pass to parse_fun.

verbose

If TRUE, display descriptive messages.

Value

a named list of dataframes.

Examples

if (FALSE) { get_odp_data(pkg_id = "dayflow", "Dayflow Results") }