Reads the polished_* files run_pipeline() wrote to the data/
sub-directory of output_dir and returns them filtered to a country and/or
year, as a named list (one element per dataset).
Usage
load_polished(
country = NULL,
year = NULL,
datasets = NULL,
output_dir = cfg$output_dir,
cfg = polis_active_config()
)Arguments
- country
Optional country/ISO3 value(s) to keep. Matched against the first present of
iso3,country_iso3code,countryin each table, so an ISO3 like"AFG"is expected. Theadm0name column is intentionally not used for this filter.NULLkeeps all.- year
Optional year(s) to keep. Matched against the first present of
year,year_onset,year_start,year_collection,collect_yr.NULLkeeps all.- datasets
Optional character vector restricting which datasets to read (by output key, e.g.
"afp","es","virus").NULL(default) reads everypolished_*file present.- output_dir
Directory the outputs were written to; defaults to
cfg$output_dir. The files are read from itsdata/sub-directory.- cfg
A
polis_config()object; defaults to the session-active config (polis_active_config()), soload_polished(country = "AFG")works when the config carriesoutput_dir.
See also
run_pipeline(), which writes the files this reads.
