Downloads the same demographic dataset across multiple years and combines
the results into a single data.table. Each year is downloaded
independently; failures for individual years are captured as warnings and
the remaining successful results are still returned.
Usage
download_demo_data_multi(
code,
years,
territory = NULL,
level = NULL,
type = NULL,
subtype = NULL,
cache_dir = NULL,
force_download = FALSE,
verbose = TRUE
)Arguments
- code
Character string identifying the dataset in the demo registry (e.g.,
"D7B").- years
Integer vector of years to download.
- territory
Character string specifying geographic territory (Pattern B only).
- level
Character string specifying geographic aggregation level (Pattern C only).
- type
Character string specifying data completeness type (Pattern C only).
- subtype
Character string specifying the data subtype (Pattern E only, e.g.,
"nascita","cittadinanza").- cache_dir
Character string specifying directory for cached files. If
NULL, uses the config default.- force_download
Logical indicating whether to bypass cache. Default
FALSE.- verbose
Logical indicating whether to print status messages. Default
TRUE.