Skip to content
Snippets Groups Projects
Commit e1b7199a authored by Bock, Andy's avatar Bock, Andy
Browse files

Added download for ak.gpkg

parent b35f697c
No related branches found
No related tags found
1 merge request!59Added download for ak.gpkg
......@@ -140,32 +140,6 @@ if(!file.exists(USGS_IT_path)) {
out_list <- c(out_list, list(USGS_IT_path = USGS_IT_path))
```
```{r Interbasin transfers - KSU}
# KSU IT Facilities - data compiled by Kerim Dickson (Kansas State University)
#-----------------------------------------------------------------------------
# Dickson, Kerim E. and Dzombak, David A., 2017. Inventory of Interbasin Transfers in the United States.
# Journal of the # American Water Resources Association (JAWRA) 53( 5): 1121‐ 1132.
# https://doi.org/10.1111/1752-1688.12561
KSU_IT_path <- file.path(data_dir, "KSU_IT")
if(!file.exists(KSU_IT_path)) {
dir.create(KSU_IT_path, recursive = TRUE, showWarnings = FALSE)
if(is.null(sbtools::current_session()))
authenticate_sb()
IT <- "IBT_Database.xlsx"
sbtools::item_file_download("5dbc53d4e4b06957974eddae", names = IT,
destinations = file.path(KSU_IT_path, IT))
rm(IT)
}
out_list <- c(out_list, list(KSU_IT_path = KSU_IT_path))
```
```{r National Inventory of Dams}
# National Inventory of Dams data coupled with NHDPlus COMIDs
#-----------------------------------------------------------------------------
......@@ -241,6 +215,7 @@ if(!file.exists(nhdplus_dir)) {
message("downloading NHDPlus...")
dir.create(nhdplus_dir, recursive = TRUE, showWarnings = FALSE)
dir.create(islands_dir, recursive = TRUE, showWarnings = FALSE)
if(is.null(sbtools::current_session()))
authenticate_sb()
......@@ -285,7 +260,7 @@ if(!file.exists(nhdplus_dir)) {
rm(gLz, xWalk)
HUC12 <- read_sf(data_paths$nhdplus_gdb, layer = "HUC12") %>% st_make_valid() %>% st_transform(., crs = 5070)
HUC12 <- read_sf(nhdplus_gdb, layer = "HUC12") %>% st_make_valid() %>% st_transform(., crs = 5070)
saveRDS(HUC12, file = file.path(nhdplus_dir, "HUC12.rds"))
......@@ -404,6 +379,27 @@ if(!dir.exists(merit_dir)) {
}
```
```{r AK GF Source data}
# Geopackage of Alaska hydrographic datasets
AK_dir <- file.path(data_dir, "AK")
if(!dir.exists(AK_dir)) {
dir.create(AK_dir, recursive = TRUE)
if(is.null(sbtools::current_session()))
authenticate_sb()
AK_GF_source <- "ak.7z"
sbtools::item_file_download("5dbc53d4e4b06957974eddae", names = AK_GF_source,
destinations = file.path(AK_dir, AK_GF_source))
system(paste0(sevenz, " e -o", AK_dir, " ", file.path(AK_dir, AK_GF_source)))
}
```
```{r e2nhd}
zip_file <- "e2nhdplusv2_us_csv.zip"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment