Retrieve AREAdata dataset/s specified by metric and spatial scale (GID).
Usage
fetch_ad(
metric = "temp",
gid = 0,
use_cache = TRUE,
cache_location = NULL,
refresh_cache = FALSE,
timeout = 240,
basereq = ad_basereq()
)Arguments
- metric
the metric to retrieve from areadata.
- gid
the spatial scale to retrieve (0 = country-level, 1=province-level ...).
- use_cache
load files from cache if possible, and save them if not present.
- cache_location
path to cache location (defaults to a temporary user directory, or one set by
set_default_ohvbd_cache()).- refresh_cache
force a refresh of the relevant cached data (and enables use_cache).
- timeout
timeout for data download from figshare/github in seconds.
- basereq
the url of the AREAdata database (usually generated by
ad_basereq()). IfNA, uses the default.