get_obsdata: Function to transform data into the format required for...

Description Usage Arguments Value Examples

View source: R/RProjects/HITHATStats/R/get_obsdata.R View source: R/get_obsdata.R

Description

This function accepts a raw data frame pulled from the NWIS webservice and returns a data frame of observed data for use in calculating HIT/HAT statistics

Usage

1
  get_obsdata(x_obs)

Arguments

x_obs

data frame pulled from NWIS webservice

Value

obs_data data frame of observed data for the chosen parameters

Examples

1
2
3
4
5
6
7
8
9
url<-"http://waterservices.usgs.gov/nwis/dv/?format=waterml,1.1&sites="
sites<-"02177000"
startdate<-"2012-09-01"
enddate<-"2012-10-01"
offering<-'00003'
property<-'00060'
obs_url<-paste(url,sites,'&startDT=',startdate,'&endDT=',enddate,'&statCd=',offering,'&parameterCd=',property,sep='')
x_obs <- getXMLWML1.1Data(obs_url)
get_obsdata(x_obs)

jlthomps/EflowStats documentation built on May 19, 2019, 12:48 p.m.