library(tidyverse)
library(here)
library(dataRetrieval)
ex_df <-data.frame(Site = rep(c(1:5),each=6))
name_df <- data.frame(site_name = c('joe_creek', 'bean_trail', 'orange_outlet', 'sane_mountain', 'fuzzy_lake'),
Site = c(1:5))
ex_name_df <- merge(ex_df, name_df, by = 'Site', all.x =TRUE)
# NOT RUN {
site_id <- '373930118491602'
parameterCd <- '72019'
startDate <- "1992-01-19"
endDate <- "2022-04-06"
# }
# NOT RUN {
# rawData <- readNWISuv(site_id,parameterCd,startDate,endDate)
#
# gw <- readNWISdv(site_id,parameterCd,startDate,endDate) %>%
# select(-agency_cd, -X_72019_00003_cd) %>%
# rename(water_depth = X_72019_00003, site = site_no)
# dv <- rawData %>%
# mutate(day = day(dateTime), month = month(dateTime), year = year(dateTime)) %>%
# group_by(year, month, day) %>%
# summarize(water_depth = mean(X_72019_00000))
#
# dv$Date <- as.Date(with(dv,paste(year, month, day,sep="-")),"%Y-%m-%d")
#
# dv$site <- "373930118491602"
#
# dv <- dv %>%
# ungroup(year, month, day) %>%
# select(-year, - month, -day) %>%
# filter(Date > "2010-12-13")
#full <- rbind(gw, dv)
#write_csv(full, here('hydrology/src_classes_spring_2022/data', 'full.csv'))