Skip to content

Commit

Permalink
move Jackson fix inside watershed mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Turner committed Jun 17, 2024
1 parent 83b9ad7 commit d1c4491
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions R/count_watershed_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,6 @@ count_watershed_data <- function(data_dir,
# read in NHD flow shapefile
import_shapefile(file.path(data_dir, file_paths["nhd_flow"])) %>% st_as_sf() -> watershed_nhd_flows

# temporary fix for Jackson MS
if(watersheds == 3743){
runoff_totals <- get_watershed_ts(3683) %>% mutate(watershed = 3743)
}

# map through all cities, computing teleconnections
watersheds %>%
Expand Down Expand Up @@ -224,6 +220,13 @@ count_watershed_data <- function(data_dir,

#-------------------------------------------------------
# TELECONNECTION - WATERSHED RUNOFF AND FLOW VALUES

# temporary fix for Jackson MS
if(watershed == 3743){
runoff_totals <- get_watershed_ts(3683) %>%
mutate(watershed = 3743)
}

runoff_totals %>%
filter(watershed == !!watershed) ->
watershed_runoff
Expand Down

0 comments on commit d1c4491

Please sign in to comment.