Skip to contents

Used when EJAM package is attached

Usage

download_latest_arrow_data(
  varnames = .arrow_ds_names,
  repository = NULL,
  envir = globalenv(),
  piggybacktag = "latest",
  force = FALSE
)

Arguments

varnames

use defaults, or vector of names like "bgej" or use "all" to get all available

repository

repository owner/name such as Public-Environmental-Data-Partners/ejamdata or "XYZ/ejamdata" (wherever the ejamdata repo is hosted, as specified in the DESCRIPTION file of this package)

envir

if needed to specify environment other than default, e.g., globalenv() or parent.frame()

piggybacktag

default is "latest", which resolves internally to the DESCRIPTION ejamdata_required_tag field. Pass a specific tag such as "v2.32.8.001" only for explicit maintenance or diagnostic work.

force

set TRUE to download requested files even if local copies exist.

Details

Checks to see what ejamdata release tag should be used for requested Arrow datasets. By default, EJAM uses the required ejamdata release tag recorded in DESCRIPTION as ejamdata_required_tag. For example, EJAM 2.32.8.001 currently looks for Arrow files in the ejamdata release tagged v2.32.8.001, not in whichever data-repository release GitHub currently marks as latest.

The installed package's data/ejamdata_version.txt marker records the release tag for locally installed Arrow files.

Relies on piggyback::pb_download() to download data files that have been stored as assets of a specific release on the data repository.

Before downloading, it asks GitHub what assets that one release actually has, and says so distinctly when the answer is a failed listing (the release may be unreachable rather than empty), a release that does not exist, a release with no assets at all, or a release missing the requested files. Transient failures are retried with backoff. Without that check, a degraded GitHub API that answers with an empty list looks exactly like a release with nothing in it, and nothing gets downloaded without any error being raised. For details, see technical details of how datasets are updated