Skip to contents

Native R port of the maintainer's scripts/refresh_arsau.py mirror: walks the bundled ARSAU_REGISTRY() and pulls each entry's datastore dump CSV from data.ontario.ca into target_dir. Entries without a published datastore resource are reported in $skipped. Filter with kinds / years to fetch a subset (recommended; the full release is large).

Usage

morie_arsau_download(
  target_dir,
  kinds = NULL,
  years = NULL,
  timeout_sec = 60L,
  quiet = FALSE
)

Arguments

target_dir

Destination directory (created if missing).

kinds

Optional character vector of ARSAU_KINDS() to restrict the download.

years

Optional vector of ARSAU_YEARS() entries.

timeout_sec

Per-file download timeout (default 60).

quiet

Suppress the progress message and per-file warnings.

Value

Invisibly, a list with downloaded (paths), skipped (registry keys), and target_dir.

Examples

# \donttest{
res <- try(morie_arsau_download(tempdir(), kinds = ARSAU_KINDS()[1],
                                years = ARSAU_YEARS()[1], quiet = TRUE))
if (!inherits(res, "try-error")) length(res$downloaded)
#> [1] 1
# }