The zip files are smaller than just the *_TREE.csv, so this just downloads
the whole zip and extracts the required CSV files. Uses
curl::multi_download() which resumes partial skips already completed
downloads when run subsequent times.
Usage
fia_download(
states,
download_dir = "fia",
extract = c("forestTIME", "rFIA", "all", "none"),
keep_zip = TRUE
)Arguments
- states
Vector of state abbreviations; for all states use
state.abb.- download_dir
Where to save the zip files.
- extract
Which files to extract from the downloaded zip file—those needed by
forestTIME, those needed byrFIA(in addition to all the tablesforestTIMEneeds), all the files, or none.- keep_zip
Logical; keep the .zip file after CSVs are extracted? Defaults to
TRUE.