Fetch Part VII compensation tables from the NCCS efile store
fetch_partvii.RdDownloads one or more years of the Form 990 Part VII compensation table
(F9-P07-T01-COMPENSATION-<year>.CSV) from the public NCCS efile store to a
local cache directory. Files already present are reused unless
overwrite = TRUE. Returns the local file paths (invisibly) so the result
can be piped into read_partvii().
Each yearly file is large (~1 GB), so downloads are cached on disk.
Usage
fetch_partvii(
years,
dest = "efdata",
table = .partvii_table_id(),
root = .nccs_efile_root(),
overwrite = FALSE,
retry_max = 3L,
timeout = 600,
verbose = TRUE
)Arguments
- years
Integer vector of tax years (e.g.
2023or2020:2023).- dest
Local cache directory. Created if it does not exist.
- table
Table id (file basename). Defaults to the Part VII compensation table; exposed so the same machinery can fetch sibling tables.
- root
Base URL of the efile store. Defaults to the public NCCS v2 store.
- overwrite
Re-download even if the file already exists. Default
FALSE.- retry_max
Number of download attempts per file. Default
3.- timeout
Per-file download timeout in seconds. Default
600.- verbose
Print progress messages. Default
TRUE.
Examples
if (FALSE) { # \dontrun{
f <- fetch_partvii( 2023 )
d <- read_partvii( f )
df <- standardize_df( d )
} # }