This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(dataRetrieval) | |
require(dplyr) | |
##get NO3 parameter codes here https://help.waterdata.usgs.gov/code/parameter_cd_nm_query?parm_nm_cd=%25nitrate%25&fmt=html | |
paracd <-c("00600", "00602", "00603") | |
WI_NWIS_NO3_sites<- whatNWISsites(stateCd="WI", parameterCD= paracd) | |
WI_NWIS_NO3_sites<-whatNWISdata(WI_NWIS_NO3_sites$site_no, parameterCd = paracd) | |
WI_NWIS_NO3_sites<-as.data.frame(WI_NWIS_NO3_sites %>% | |
filter(site_tp_cd == "GW") %>% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(plyr) | |
require(stringr) | |
require(dataRetrieval) | |
require(geoknife) | |
library(zoo) | |
library(imputeTS) | |
library(lubridate) | |
library(bsts) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(plyr) | |
require(stringr) | |
require(ggplot2) | |
require(dataRetrieval) #this library is published by USGS | |
require(geoknife) | |
require(dplyr) | |
require(zoo) | |
require(lubridate) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(reshape2) | |
library(ggplot2) | |
library(data.table) | |
Lake_Mi<-fread('https://www.glerl.noaa.gov/data/dashboard/data/levels/1918_PRES/miHuron1918.csv', skip = 2, header=TRUE) | |
Lake_Mi<-melt(Lake_Mi, id.vars = "year") | |
Lake_Mi$date<-paste(Lake_Mi$year, Lake_Mi$variable, "01", collapse = NULL) | |
Lake_Mi$date<-as.Date(Lake_Mi$date, "%Y %B %d") | |
ggplot(Lake_Mi, aes(Lake_Mi$date, Lake_Mi$value)) +geom_line() |