Skip to content

Instantly share code, notes, and snippets.

@salvelinusbob
Last active February 21, 2018 18:47
Show Gist options
  • Save salvelinusbob/3cd15aa2935da1ed4294142f63a4a4d7 to your computer and use it in GitHub Desktop.
Save salvelinusbob/3cd15aa2935da1ed4294142f63a4a4d7 to your computer and use it in GitHub Desktop.
NWIS NO3 WI Sites
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") %>%
group_by(site_no, station_nm, site_tp_cd, dec_lat_va, dec_long_va)%>%
summarise(sum(count_nu), max(end_date), min(begin_date)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment