NHDPlus data provides the most comprehensive and high-resolution hydrography data. This function downloads national dataset from NHDPlus Version 2.1 on USGS Amazon S3 storage.
Arguments
- region
character(1). One of
c("Lower48", "Islands"). When"Islands"is selected, the data will be downloaded for Hawaii, Puerto Rico, and Virgin Islands.- type
character(1). One of
c("Seamless", "OceanCatchment").- directory_to_save
character(1). Directory to download files.
- acknowledgement
logical(1). By setting
TRUEthe user acknowledges that the data downloaded using this function may be very large and use lots of machine storage and memory.- download
logical(1).
FALSEwill generate a *.txt file containing all download commands. By settingTRUEthe function will download all of the requested data files.- remove_command
logical(1). Remove (
TRUE) or keep (FALSE) the text file containing download commands.- unzip
logical(1). Unzip the downloaded compressed files. Default is
FALSE. Not working for this function since HUC data is in 7z format.- hash
logical(1). By setting
TRUEthe function will return anrlang::hash_file()hash character corresponding to the downloaded files. Default isFALSE.
Value
For
hash = FALSE, NULLFor
hash = TRUE, anrlang::hash_filecharacter.Downloaded files will be stored in
directory_to_save.
Note
For HUC, set type = "Seamless". HUC12 layer presents in the seamless
geodatabase. Users can aggregate HUC12 layer to make HUC6, HUC8, HUC10, etc.
For whom wants to download a specific region,
please visit Get NHDPlus Data
References
U.S. Geological Survey (2023). “National Hydrography Dataset (NHD) – USGS National Map Downloadable Data Collection.” https://www.usgs.gov/national-hydrography.
Examples
if (FALSE) { # \dontrun{
download_huc(
region = "Lower48",
type = "Seamless",
directory_to_save = tempdir(),
acknowledgement = TRUE,
download = FALSE, # NOTE: download skipped for examples,
remove_command = TRUE,
unzip = FALSE
)
} # }