Load NHD layers into current session
nhd_load(
state,
dsn,
file_ext = NA,
approve_all_dl = FALSE,
temporary = FALSE,
...
)
character state abbreviation
character name of a NHD layer
character choice of "shp" for spatial data and "dbf" or "gpkg" for non-spatial. optional
logical blanket approval to download all missing data. Defaults to TRUE if session is non-interactive.
logical set FALSE to save data to a persistent rappdirs location
arguments passed to sf::st_read
Spatial simple features object or data frame depending on the dsn type and value passed to file_ext
This function will ask the user to approve downloading missing data unless approve_all_dl is set to TRUE.
if (FALSE) {
dt <- nhd_load(c("RI"), c("NHDWaterbody"))
dt <- nhd_load(c("CT", "RI"), "NHDWaterbody")
dt <- nhd_load(c("CT", "RI"), "NHDWaterbody", quiet = TRUE)
dt <- nhd_load("MI", "NHDFlowline")
dt <- nhd_load("RI", "NHDReachCrossReference")
dt <- nhd_load("RI", "NHDWaterbody", file_ext = "dbf")
dt <- nhd_load(c("RI", "DC"), "NHDWaterbody", file_ext = "gpkg")
}