diff --git a/workspace/05_hyRefactor_flines.Rmd b/workspace/05_hyRefactor_flines.Rmd index 6efa5e6dd93a9006e59cdadbd05fed216e913f49..1078df2ae5b962e93d13aa3904c3fe0e68a229fe 100644 --- a/workspace/05_hyRefactor_flines.Rmd +++ b/workspace/05_hyRefactor_flines.Rmd @@ -72,7 +72,14 @@ events <- read_sf("cache/gages_info.gpkg", "Gages") %>% filter(reach_meas - FromMeas > 10 & AreaSqKM > 2 & ToMeas - reach_meas > 10 & LENGTHKM > (combine_meters / 1000)) %>% select(COMID = comid, REACHCODE = reachcode, REACH_meas = reach_meas, site_no) %>% - filter(!COMID %in% avoid$COMID) + filter(!COMID %in% avoid$COMID) %>% + mutate(event_type = "streamgage") + +if(!needs_layer(nav_gpkg, "WB_events")){ + wb_events <- read_sf(nav_gpkg, "WB_events") %>% + filter(COMID %in% nhd$COMID) + events <- rbind(events, select(wb_events, COMID, REACHCODE, REACH_meas, site_no = WBAREACOMI, event_type)) +} # Write out events and outelts write_sf(events, out_refac_gpkg, split_layer)