diff --git a/USGS_NWIS.R b/USGS_NWIS.R index 62db4f6..2015086 100644 --- a/USGS_NWIS.R +++ b/USGS_NWIS.R @@ -31,7 +31,7 @@ for(i in 1:nrow(rivers)){ filter(Date > max(discharge_dv$Date))) } save(discharge_dv, file = paste0("data/",rivername,"_discharge_dv.Rda")) - + # this downloads most recent discharge unit value (every 15 min) data for the river if(sum(list.files(path = "data") %>% match(paste0(rivername,"_discharge_uv.Rda")), na.rm = TRUE) == 0){ discharge_uv <- readNWISuv(siteNumber = rivers$siteNumber[i], parameterCd = "00060") @@ -142,7 +142,7 @@ for(i in 1:nrow(rivers)){ ggplot(data = river_stats_dv %>% filter(Date > Sys.time() - months(6) - days(1), Date < Sys.time() + months(3)) - ) + + ) + geom_ribbon(aes(x = dateTime, ymin = X5., ymax = X95., diff --git a/example_last_6_months.png b/example_last_6_months.png index 25172a3..76bcc5f 100644 Binary files a/example_last_6_months.png and b/example_last_6_months.png differ diff --git a/river_IDs.csv b/river_IDs.csv index 2d365a9..7cedb55 100644 --- a/river_IDs.csv +++ b/river_IDs.csv @@ -1,11 +1,9 @@ names,siteNumber +North Branch Chicago,05534500 +Des Plaines,05533600 Elwha,12045500 -Calawah,12043000 -Hoh,12041200 -Dungeness,12048000 -Duckabush,12054000 Wenatchee,12462500 Snake,13013650 Wisconsin,05407000 Cedar,12119000 -Colorado,09380000 +Colorado,09380000 \ No newline at end of file