Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
reference-hydrofabric
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Water Mission Area
nhgf
reference-hydrofabric
Commits
72a275de
Commit
72a275de
authored
1 year ago
by
Bock, Andy
Browse files
Options
Downloads
Patches
Plain Diff
Fixed RC issues, added conversion factor for sq mi to sq km
parent
d7df188a
No related branches found
No related tags found
1 merge request
!182
Bock
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
workspace/01_Gage_Selection.Rmd
+4
-4
4 additions, 4 deletions
workspace/01_Gage_Selection.Rmd
with
4 additions
and
4 deletions
workspace/01_Gage_Selection.Rmd
+
4
−
4
View file @
72a275de
...
@@ -44,7 +44,6 @@ nhd <- read_sf(data_paths$ref_fl)
...
@@ -44,7 +44,6 @@ nhd <- read_sf(data_paths$ref_fl)
if(file.exists("cache/dropped_gages.csv")){
if(file.exists("cache/dropped_gages.csv")){
file.remove("cache/dropped_gages.csv")
file.remove("cache/dropped_gages.csv")
}
}
# gages II
# gages II
gages_ii <- read_sf(data_paths$gagesii_lyr)
gages_ii <- read_sf(data_paths$gagesii_lyr)
ref_gages <- read_sf("data/nldi/usgs_nldi_gages.geojson")
ref_gages <- read_sf("data/nldi/usgs_nldi_gages.geojson")
...
@@ -124,7 +123,7 @@ if(!file.exists("temp/GagestoCheck_GAGESIII.csv")){
...
@@ -124,7 +123,7 @@ if(!file.exists("temp/GagestoCheck_GAGESIII.csv")){
# Subset further by streamgages below the minimum drainage area critera
# Subset further by streamgages below the minimum drainage area critera
gagesIII_db_fin <- gagesIII_db %>%
gagesIII_db_fin <- gagesIII_db %>%
filter(!site_no %in% potCanalsIII$site_no, drain_area > min_da_km_gages
)
filter(!site_no %in% potCanalsIII$site_no, drain_area >
(
min_da_km_gages
* sqkm_sqmi))
# Write out gages that dropped to document.
# Write out gages that dropped to document.
gage_document(select(potCanalsIII, site_no), "GAGES-III", "ST; Pot. Canal")
gage_document(select(potCanalsIII, site_no), "GAGES-III", "ST; Pot. Canal")
...
@@ -176,7 +175,7 @@ gageloc_sf_full <- read_sf(data_paths$nhdplus_gdb, "Gage") %>%
...
@@ -176,7 +175,7 @@ gageloc_sf_full <- read_sf(data_paths$nhdplus_gdb, "Gage") %>%
filter(!site_no %in% gagesIII_sf_full$site_no) %>%
filter(!site_no %in% gagesIII_sf_full$site_no) %>%
# Update index information with NLDI gages
# Update index information with NLDI gages
left_join(select(st_drop_geometry(ref_gages), site_no = id,
left_join(select(st_drop_geometry(ref_gages), site_no = id,
comid = nhdpv2_COMID, reachcode = nhdpv2_
COMID
,
comid = nhdpv2_COMID, reachcode = nhdpv2_
REACHCODE
,
reach_meas = nhdpv2_REACH_measure ), by = "site_no")
reach_meas = nhdpv2_REACH_measure ), by = "site_no")
# Subset to locations with streamflow
# Subset to locations with streamflow
...
@@ -224,7 +223,8 @@ if(!file.exists("temp/GagestoCheck_GageLoc.csv")){
...
@@ -224,7 +223,8 @@ if(!file.exists("temp/GagestoCheck_GageLoc.csv")){
}
}
gageloc_db_fin <- gageloc_db %>%
gageloc_db_fin <- gageloc_db %>%
filter(!site_no %in% potCanals_gageloc$site_no, drain_area > min_da_km_gages)
filter(!site_no %in% potCanals_gageloc$site_no, drain_area >
(min_da_km_gages * sqkm_sqmi))
# Gages that are ST site types, but reside on canals, artificial waterbodies.
# Gages that are ST site types, but reside on canals, artificial waterbodies.
gage_document(select(potCanals_gageloc, site_no), "GageLoc", "ST; Pot. Canal")
gage_document(select(potCanals_gageloc, site_no), "GageLoc", "ST; Pot. Canal")
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment