This function downloads and decompresses staged seamless NHDPlusV2 data. The following requirements are needed: p7zip (MacOS), 7zip (windows) Please see: https://www.epa.gov/waterdata/get-nhdplus-national-hydrography-dataset-plus-data for more information and metadata about this data.

Default downloads lower-48 only. Pass the island archive URL to `url` to get Hawaii, Puerto Rico, the Virgin Islands, and the Pacific Islands instead. No Alaska data are available.

The lower-48 archive is roughly 8 GB and extraction needs 7zip installed, so this function has no example. Pass any writable directory as outdir; the archive is downloaded there, extracted in place, and the path to the geodatabase returned:

download_nhdplusv2(
  outdir,
  url = paste0("https://dmap-data-commons-ow.s3.amazonaws.com/NHDPlusV21/",
    "Data/NationalData/NHDPlusV21_NationalData_Seamless", "_Geodatabase_Lower48_07.7z"),
  progress = TRUE
)

Arguments

outdir

The folder path where data should be downloaded and extracted

url

the location of the online resource

progress

boolean display download progress?

Value

character path to the local geodatabase