Saves the data of several polls as JSON files, exactly as published by
POLITICO, e.g. to keep a snapshot or to work offline. The files can be read
with popRead(code, dir = dir).
Arguments
- dir
Directory the files are written to, created if necessary.
- codes
Codes of the polls to download, by default all polls listed by
popGetInfo().- overwrite
Whether existing files should be replaced.
- quiet
Whether progress messages should be suppressed.
Value
Invisibly a data.table with the columns code, file, status
("downloaded", "skipped" or "failed") and error.