Skip to content
Snippets Groups Projects
Commit 1f262ebc authored by Blodgett, David L.'s avatar Blodgett, David L.
Browse files

cleanup the reference network code

parent dfb04984
No related branches found
No related tags found
2 merge requests!136#76 for review retry,!135#76 progress for review
......@@ -151,12 +151,18 @@ net_new$dnlevelpat[is.na(net_new$dnlevelpat)] <- 0
coastal_comids <- nhd_net$comid[nhd_net$terminalfl == 1 & nhd_net$streamleve == 1]
net_new$streamleve <-select(net_new, levelpathi, dnlevelpat, comid) %>%
net_new$streamleve <- select(net_new, levelpathi, dnlevelpat, comid) %>%
mutate(coastal = comid %in% coastal_comids) %>%
get_streamlevel()
net_new$streamorde <- nhdplusTools::get_streamorder(select(net_new, ID = comid, toID = tocomid), status = TRUE)
net_new <- left_join(net_new,
select(nhd_net, comid, vpuin, vpuout, wbareatype,
slope, slopelenkm, ftype, gnis_name,
gnis_id, wbareacomi, hwnodesqkm, rpuid,
vpuid, roughness), by = "comid")
data.table::fwrite(net_new,
file = "cache/enhd_nhdplusatts.csv",
sep = ",")
......@@ -204,7 +210,6 @@ arrow::write_parquet(net_new, "cache/enhd_nhdplusatts.parquet")
# sbtools::item_replace_files("60c92503d34e86b9389df1c9", "cache/enhd_nhdplusatts.fst")
# sbtools::item_replace_files("60c92503d34e86b9389df1c9", "cache/enhd_nhdplusatts.parquet")
```
```{r}
......
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