-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1d4838e
commit e96f2f6
Showing
3 changed files
with
38 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
Package: hydrofab | ||
Type: Package | ||
Title: Hydrologic Network Refactoring and Aggregation Tools | ||
Version: 0.5.0 | ||
Version: 0.5.1 | ||
Authors@R: c(person(given = "Mike", family = "Johnson", | ||
role = c("aut", "cre"), | ||
comment = c(ORCID = "0000-0002-5288-8350"), | ||
email = "[email protected]"), | ||
person("David", "Blodgett", | ||
role = c("ctb"), | ||
email = "[email protected]")) | ||
Description: A collection of tools for maniputatling hydrologic and hydraulic networks | ||
Description: A collection of tools for manipulating hydrologic and hydraulic networks | ||
URL: https://github.com/mikejohnson51/hydrofab | ||
BugReports: https://github.com/mikejohnson51/hydrofab/issues | ||
Depends: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
## TASK 2: Assign Globally Unique Identifiers ---- | ||
|
||
pacman::p_load(hydrofabric) | ||
devtools::load_all() | ||
|
||
vpus = vpu_boundaries$VPUID[1:21] | ||
|
||
base = '/Volumes/MyBook/nextgen' | ||
|
||
## TASK 1: build out uniform catchment distribution ---- | ||
process = data.frame( | ||
vpus = vpus, | ||
outfiles = glue("{base}/uniform/uniform_{vpus}.gpkg"), | ||
global = glue("{base}/global_uniform/uniform_{vpus}.gpkg") | ||
) | ||
|
||
unlink(process$global) | ||
|
||
gs_file = 'https://code.usgs.gov/wma/nhgf/reference-hydrofabric/-/raw/04cd22f6b5f3f53d10c0b83b85a21d2387dfb6aa/workspace/cache/rpu_vpu_out.csv' | ||
|
||
modifications = read.csv(gs_file) %>% | ||
filter(VPUID != toVPUID) %>% | ||
rename(from = COMID, to = toCOMID) | ||
|
||
meta = assign_global_identifiers(gpkgs = process$outfiles, | ||
outfiles = process$global, | ||
modifications = modifications) | ||
|
||
for(i in 1:nrow(process)){ | ||
try(append_style(process$global[i], layer_names = c("flowpaths", "divides", "hydrolocations")), silent = TRUE) | ||
} | ||
|
||
arrow::read_parquet('/Users/mjohnson/Downloads/ml_exports.parquet') | ||
|
||
|