diff --git a/workspace/01_Gage_Selection.Rmd b/workspace/01_Gage_Selection.Rmd index c39ee2d293d9c984177529ab2416bb343301012b..f7c247f65542cdb8e751279cac302a5a039a6572 100644 --- a/workspace/01_Gage_Selection.Rmd +++ b/workspace/01_Gage_Selection.Rmd @@ -44,7 +44,6 @@ nhd <- read_sf(data_paths$ref_fl) if(file.exists("cache/dropped_gages.csv")){ file.remove("cache/dropped_gages.csv") } - # gages II gages_ii <- read_sf(data_paths$gagesii_lyr) ref_gages <- read_sf("data/nldi/usgs_nldi_gages.geojson") @@ -124,7 +123,7 @@ if(!file.exists("temp/GagestoCheck_GAGESIII.csv")){ # Subset further by streamgages below the minimum drainage area critera 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. 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") %>% filter(!site_no %in% gagesIII_sf_full$site_no) %>% # Update index information with NLDI gages 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") # Subset to locations with streamflow @@ -224,7 +223,8 @@ if(!file.exists("temp/GagestoCheck_GageLoc.csv")){ } 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. gage_document(select(potCanals_gageloc, site_no), "GageLoc", "ST; Pot. Canal")