Retrieve AREAdata dataset/s specified by metric and spatial scale (GID).
Usage
fetch_ad(
metric = "temp",
gid = 0,
use_cache = FALSE,
cache_location = "user",
refresh_cache = FALSE,
basereq = NA
)
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 user directory obtained from
tools::R_user_dir()
).- refresh_cache
force a refresh of the relevant cached data.
- basereq
the url of the AREAdata database (usually generated by
ad_basereq()
). IfNA
, uses the default.