Skip to contents

Fetches the Hugging Face Parquet file for one court, tribunal or law collection into a cache directory and returns its path. Files range from a few megabytes (small tribunals) to several hundred (the Supreme Court of Canada, the BC Supreme Court).

Usage

morie_ingest_a2aj_download(
  dataset,
  doc_type = c("cases", "laws"),
  cache_dir = NULL,
  refresh = FALSE,
  quiet = TRUE
)

Arguments

dataset

Dataset code, for example "SCC".

doc_type

"cases" (default) or "laws".

cache_dir

Directory to keep the file in. Defaults to a session-scoped tempdir() subdirectory; pass morie_cache_dir("a2aj") to keep it across sessions.

refresh

Re-download even when the file is already cached.

quiet

Passed to download.file.

Value

The local path of the Parquet file, invisibly.

Examples

# \donttest{
p <- try(morie_ingest_a2aj_download("SCT"))
if (!inherits(p, "try-error")) file.info(p)$size
#> [1] 7645054
# }