diff --git a/inst/doc/Rplots.pdf b/inst/doc/Rplots.pdf index 46b2f1617b19364ed5cff6642d145a08bb58f5ab..06e77e86c0e6d801b89584514681073a0d00fa04 100644 Binary files a/inst/doc/Rplots.pdf and b/inst/doc/Rplots.pdf differ diff --git a/inst/doc/dataRetrieval-concordance.tex b/inst/doc/dataRetrieval-concordance.tex index 81fc932fc119d7fde40b573d155b6eb0eaad427e..dec73fe01f2498d39fc4f0a7e4390dac694e528d 100644 --- a/inst/doc/dataRetrieval-concordance.tex +++ b/inst/doc/dataRetrieval-concordance.tex @@ -2,10 +2,10 @@ 1 84 1 1 8 1 1 1 10 16 0 1 2 5 1 1 10 15 0 1 2 13 1 1 2 1 0 1 2 1 0 1 1 % 3 0 1 2 2 1 1 2 7 0 1 2 7 1 1 3 2 0 1 1 12 0 1 2 5 1 1 4 3 0 1 3 1 0 1 % 3 7 0 1 3 4 0 1 2 2 1 1 8 7 0 1 4 1 0 1 2 21 0 1 2 7 1 1 3 2 0 2 1 7 0 % -1 2 1 1 1 2 7 0 1 2 9 1 1 3 2 0 2 1 1 2 3 0 1 2 1 1 1 2 10 0 1 2 4 1 1 % -2 1 0 3 1 1 3 4 0 1 2 4 1 1 6 4 0 1 1 1 4 3 0 3 1 3 0 1 2 3 1 1 -5 1 9 % -14 1 1 2 1 0 1 1 1 2 1 0 1 3 5 0 2 2 10 0 1 2 3 1 1 5 4 0 1 1 3 0 1 2 3 % -1 1 -5 1 9 12 1 1 4 2 0 2 1 1 3 1 0 1 3 1 0 1 1 7 0 1 2 1 1 1 6 5 0 1 1 % +1 2 1 1 1 2 7 0 1 2 9 1 1 4 2 0 2 1 1 2 3 0 1 2 4 1 1 3 1 0 3 1 1 3 5 0 % +1 3 4 1 1 2 1 0 1 4 3 0 1 1 1 4 3 0 3 1 3 0 1 2 3 1 1 -5 1 9 14 1 1 2 1 % +0 1 1 1 2 1 0 1 3 5 0 2 2 10 0 1 2 3 1 1 2 1 0 1 4 3 0 1 1 4 0 1 3 3 1 % +1 -6 1 10 12 1 1 4 2 0 2 1 1 3 1 0 1 3 1 0 1 1 7 0 1 2 1 1 1 6 5 0 1 1 % 3 0 1 2 2 1 1 -4 1 8 11 1 1 3 2 0 1 1 12 0 1 2 8 1 1 3 2 0 5 1 3 0 1 2 % 13 1 1 2 1 0 1 1 3 0 1 2 8 1 1 2 1 0 2 1 1 3 5 0 1 2 2 1 1 11 18 0 1 2 % 9 1 1 3 5 0 1 2 2 1 1 12 24 0 1 2 11 1 1 14 12 0 1 2 9 1 1 2 17 0 1 3 % diff --git a/inst/doc/dataRetrieval-fig1.pdf b/inst/doc/dataRetrieval-fig1.pdf index 69ec6765f5bb0932d2afe7a1b95e974238afabed..70dbab89e72a19d1c107d1e2b284dfe433e23b39 100644 Binary files a/inst/doc/dataRetrieval-fig1.pdf and b/inst/doc/dataRetrieval-fig1.pdf differ diff --git a/inst/doc/dataRetrieval-fig2.pdf b/inst/doc/dataRetrieval-fig2.pdf index 631aacc290cedab7d509e298e625dddc85b21edf..d05927f1b89356b1fe4dc5e996dd24ef80f422c5 100644 Binary files a/inst/doc/dataRetrieval-fig2.pdf and b/inst/doc/dataRetrieval-fig2.pdf differ diff --git a/inst/doc/dataRetrieval-fig3.pdf b/inst/doc/dataRetrieval-fig3.pdf index 33c0f4820e24139ee94b744e2ca213a92047f9c7..13609b4ad33d666daab44857d10aca9ab600f2d5 100644 Binary files a/inst/doc/dataRetrieval-fig3.pdf and b/inst/doc/dataRetrieval-fig3.pdf differ diff --git a/inst/doc/dataRetrieval-figegretEx.pdf b/inst/doc/dataRetrieval-figegretEx.pdf index a3a2c62753ff3d9d87c6aaefda19fc7d528414e2..eabd34090461d3ee4db8bff18c5ba52555cae604 100644 Binary files a/inst/doc/dataRetrieval-figegretEx.pdf and b/inst/doc/dataRetrieval-figegretEx.pdf differ diff --git a/inst/doc/dataRetrieval.Rnw b/inst/doc/dataRetrieval.Rnw index c0db6f453f3b1500b26b33c06361bae42bd4b2d6..fdc171bbd9f8f8cf6e53b565308afc1ec0cc38b6 100644 --- a/inst/doc/dataRetrieval.Rnw +++ b/inst/doc/dataRetrieval.Rnw @@ -226,7 +226,8 @@ To obtain historic daily records of USGS data, use the retrieveNWISData function The dates (start and end) need to be in the format \texttt{"}YYYY-MM-DD\texttt{"} (note: the user does need to include the quotes). Setting the start date to \texttt{"}\texttt{"} will indicate to the program to ask for the earliest date, setting the end date to \texttt{"}\texttt{"} will ask for the latest available date. -<<label=getNWISDaily, echo=TRUE>>= +<<label=getNWISDaily, echo=TRUE, eval=FALSE>>= + # Continuing with our Choptank River example parameterCd <- "00060" # Discharge (cfs) startDate <- "" # Will request earliest date @@ -235,16 +236,12 @@ endDate <- "" # Will request latest date discharge <- retrieveNWISData(siteNumber, parameterCd, startDate, endDate) @ -A dataframe is returned that looks like the following: -<<dischargeData, echo=FALSE>>= -head(discharge) -@ - The variable datetime is automatically imported as a Date. Each requested parameter has a value and remark code column. The names of these columns depend on the requested parameter and stat code combinations. USGS remark codes are often \texttt{"}A\texttt{"} (approved for publication) or \texttt{"}P\texttt{"} (provisional data subject to revision). A more complete list of remark codes can be found here: \url{http://waterdata.usgs.gov/usa/nwis/help?codes_help} Another example that doesn't use the defaults would be a request for mean and maximum daily temperature and discharge in early 2012: <<label=getNWIStemperature, echo=TRUE>>= + parameterCd <- c("00010","00060") # Temperature and discharge statCd <- c("00001","00003") # Mean and maximum startDate <- "2012-01-01" @@ -252,6 +249,7 @@ endDate <- "2012-06-30" temperatureAndFlow <- retrieveNWISData(siteNumber, parameterCd, startDate, endDate, StatCd=statCd,interactive=FALSE) + @ Daily data is pulled from \url{http://waterservices.usgs.gov/rest/DV-Test-Tool.html}. @@ -259,14 +257,14 @@ Daily data is pulled from \url{http://waterservices.usgs.gov/rest/DV-Test-Tool.h An example of plotting the above data (Figure \ref{fig:TD}): <<label=getNWIStemperaturePlot, echo=TRUE>>= - +colnames <- names(temperatureAndFlow) with(temperatureAndFlow, plot( - datetime, X01_00010_00003, + get(colnames[3]), get(colnames[6]), xlab="Date",ylab="Temperature [C]" )) par(new=TRUE) with(temperatureAndFlow, plot( - datetime, X02_00060_00003, + get(colnames[3]), get(colnames[8]), col="red",type="l",xaxt="n",yaxt="n",xlab="",ylab="",axes=FALSE )) axis(4,col="red",col.axis="red") @@ -297,9 +295,9 @@ Any data that are collected at regular time intervals (such as 15-minute or hour <<label=getNWISUnit, echo=TRUE>>= parameterCd <- "00060" # Discharge (cfs) -startDate <- "2013-03-12" +startDate <- "2012-05-12" # or use (yesterday): startDate <- as.character(Sys.Date()-1) -endDate <- "2013-03-13" +endDate <- "2012-05-13" # or use (today): endDate <- as.character(Sys.Date()) dischargeToday <- retrieveUnitNWISData(siteNumber, parameterCd, startDate, endDate) @@ -313,11 +311,13 @@ Note that time now becomes important, so the variable datetime is a POSIXct, and A simple plotting example is shown in Figure \ref{fig:RT}: <<label=getNWISUnit, echo=TRUE>>= +colnames <- names(dischargeToday) with(dischargeToday, plot( - datetime, X02_00060, + get(colnames[3]), get(colnames[4]), ylab="Discharge [cfs]",xlab="" )) title(ChoptankInfo$station.nm) + @ \newpage @@ -327,7 +327,7 @@ title(ChoptankInfo$station.nm) <<getNWISUnit>> @ \end{center} -\caption{Real-time discharge plot of Choptank River from March 12-13, 2013.} +\caption{Real-time discharge plot of Choptank River from May 12-13, 2012.} \label{fig:RT} \end{figure} diff --git a/inst/doc/dataRetrieval.log b/inst/doc/dataRetrieval.log index a4b2780545799820219fa7e5976ab9b5be06cdbe..b7d83422ac3be2c326cf83ca27312ad3448b0d5e 100644 --- a/inst/doc/dataRetrieval.log +++ b/inst/doc/dataRetrieval.log @@ -1,4 +1,4 @@ -This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9) (preloaded format=pdflatex 2012.1.6) 14 MAR 2013 17:51 +This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9) (preloaded format=pdflatex 2012.1.6) 28 MAR 2013 14:05 entering extended mode **dataRetrieval.tex (D:\LADData\RCode\dataRetrieval\inst\doc\dataRetrieval.tex @@ -506,71 +506,67 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] Overfull \vbox (21.68121pt too high) has occurred while \output is active [] -[7] <dataRetrieval-fig1.pdf, id=223, 433.62pt x 289.08pt> +[7] <dataRetrieval-fig1.pdf, id=224, 433.62pt x 289.08pt> File: dataRetrieval-fig1.pdf Graphic file (type pdf) <use dataRetrieval-fig1.pdf> -Package pdftex.def Info: dataRetrieval-fig1.pdf used on input line 346. +Package pdftex.def Info: dataRetrieval-fig1.pdf used on input line 335. (pdftex.def) Requested size: 358.46039pt x 238.98355pt. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] -[8] +[8 <D:/LADData/RCode/dataRetrieval/inst/doc/dataRetrieval-fig1.pdf>] Overfull \vbox (21.68121pt too high) has occurred while \output is active [] -[9 <D:/LADData/RCode/dataRetrieval/inst/doc/dataRetrieval-fig1.pdf>] -Overfull \vbox (21.68121pt too high) has occurred while \output is active [] - - -[10] <dataRetrieval-fig2.pdf, id=247, 433.62pt x 289.08pt> +[9] <dataRetrieval-fig2.pdf, id=243, 433.62pt x 289.08pt> File: dataRetrieval-fig2.pdf Graphic file (type pdf) <use dataRetrieval-fig2.pdf> -Package pdftex.def Info: dataRetrieval-fig2.pdf used on input line 402. +Package pdftex.def Info: dataRetrieval-fig2.pdf used on input line 393. (pdftex.def) Requested size: 358.46039pt x 238.98355pt. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] -[11 <D:/LADData/RCode/dataRetrieval/inst/doc/dataRetrieval-fig2.pdf>] -<dataRetrieval-fig3.pdf, id=261, 433.62pt x 289.08pt> +[10 <D:/LADData/RCode/dataRetrieval/inst/doc/dataRetrieval-fig2.pdf>] +<dataRetrieval-fig3.pdf, id=257, 433.62pt x 289.08pt> File: dataRetrieval-fig3.pdf Graphic file (type pdf) <use dataRetrieval-fig3.pdf> -Package pdftex.def Info: dataRetrieval-fig3.pdf used on input line 448. +Package pdftex.def Info: dataRetrieval-fig3.pdf used on input line 439. (pdftex.def) Requested size: 358.46039pt x 238.98355pt. -Overfull \hbox (0.79091pt too wide) in paragraph at lines 459--460 +Overfull \hbox (0.79091pt too wide) in paragraph at lines 450--451 \T1/aer/m/n/10.95 EPA) or NWIS database. Since STORET does not use USGS pa-ram- e-ter codes, a \T1/aett/m/n/10.95 "\T1/aer/m/n/10.95 characteristic [] -LaTeX Font Info: Try loading font information for TS1+aett on input line 463 +LaTeX Font Info: Try loading font information for TS1+aett on input line 454 . (C:/PROGRA~1/R/R-215~1.3/share/texmf/tex/latex\ts1aett.fd File: ts1aett.fd ) -LaTeX Font Info: Try loading font information for TS1+cmtt on input line 463 +LaTeX Font Info: Try loading font information for TS1+cmtt on input line 454 . ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\ts1cmtt.fd" File: ts1cmtt.fd 1999/05/25 v2.5h Standard LaTeX font definitions ) LaTeX Font Info: Font shape `TS1/aett/m/sl' in size <10.95> not available -(Font) Font shape `TS1/cmtt/m/sl' tried instead on input line 463. +(Font) Font shape `TS1/cmtt/m/sl' tried instead on input line 454. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] -[12 <D:/LADData/RCode/dataRetrieval/inst/doc/dataRetrieval-fig3.pdf>] +[11 <D:/LADData/RCode/dataRetrieval/inst/doc/dataRetrieval-fig3.pdf>] Overfull \vbox (21.68121pt too high) has occurred while \output is active [] -[13] -Underfull \hbox (badness 10000) in paragraph at lines 541--559 +[12] +Underfull \hbox (badness 10000) in paragraph at lines 532--550 [] @@ -578,6 +574,10 @@ Underfull \hbox (badness 10000) in paragraph at lines 541--559 Overfull \vbox (21.68121pt too high) has occurred while \output is active [] +[13] +Overfull \vbox (21.68121pt too high) has occurred while \output is active [] + + [14] Overfull \vbox (21.68121pt too high) has occurred while \output is active [] @@ -594,89 +594,85 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] Overfull \vbox (21.68121pt too high) has occurred while \output is active [] -[18] -Overfull \vbox (21.68121pt too high) has occurred while \output is active [] - - -[19] <dataRetrieval-figegretEx.pdf, id=313, 433.62pt x 433.62pt> +[18] <dataRetrieval-figegretEx.pdf, id=308, 433.62pt x 433.62pt> File: dataRetrieval-figegretEx.pdf Graphic file (type pdf) <use dataRetrieval-figegretEx.pdf> -Package pdftex.def Info: dataRetrieval-figegretEx.pdf used on input line 780. +Package pdftex.def Info: dataRetrieval-figegretEx.pdf used on input line 771. (pdftex.def) Requested size: 358.46039pt x 358.47534pt. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] -[20] +[19] Overfull \vbox (21.68121pt too high) has occurred while \output is active [] -[21 <D:/LADData/RCode/dataRetrieval/inst/doc/dataRetrieval-figegretEx.pdf>] +[20 <D:/LADData/RCode/dataRetrieval/inst/doc/dataRetrieval-figegretEx.pdf>] Overfull \vbox (21.68121pt too high) has occurred while \output is active [] -[22 +[21 ] Overfull \vbox (21.68121pt too high) has occurred while \output is active [] -[23] +[22] Overfull \vbox (21.68121pt too high) has occurred while \output is active [] -[24] +[23] Overfull \vbox (15.16835pt too high) has occurred while \output is active [] Overfull \vbox (21.68121pt too high) has occurred while \output is active [] -[25] +[24] Overfull \vbox (21.68121pt too high) has occurred while \output is active [] -[26] +[25] Overfull \vbox (21.68121pt too high) has occurred while \output is active [] -[27] +[26] Overfull \vbox (21.68121pt too high) has occurred while \output is active [] -[28 +[27 -] <table1.png, id=361, 554.07pt x 125.71968pt> +] <table1.png, id=357, 554.07pt x 125.71968pt> File: table1.png Graphic file (type png) <use table1.png> -Package pdftex.def Info: table1.png used on input line 1077. +Package pdftex.def Info: table1.png used on input line 1068. (pdftex.def) Requested size: 358.46039pt x 81.33507pt. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] -[29 <D:/LADData/RCode/dataRetrieval/inst/doc/table1.png>] -Package atveryend Info: Empty hook `BeforeClearDocument' on input line 1099. +[28 <D:/LADData/RCode/dataRetrieval/inst/doc/table1.png>] +Package atveryend Info: Empty hook `BeforeClearDocument' on input line 1090. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] -[30 +[29 ] -Package atveryend Info: Empty hook `AfterLastShipout' on input line 1099. +Package atveryend Info: Empty hook `AfterLastShipout' on input line 1090. (D:\LADData\RCode\dataRetrieval\inst\doc\dataRetrieval.aux) -Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 1099. -Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 1099. +Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 1090. +Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 1090. Package rerunfilecheck Info: File `dataRetrieval.out' has not changed. (rerunfilecheck) Checksum: 3B1480473EC95CC4090ED48BB3268644;2119. ) Here is how much of TeX's memory you used: - 7546 strings out of 494045 - 108400 string characters out of 3145961 - 194724 words of memory out of 3000000 + 7545 strings out of 494045 + 108393 string characters out of 3145961 + 194722 words of memory out of 3000000 10596 multiletter control sequences out of 15000+200000 45443 words of font info for 92 fonts, out of 3000000 for 9000 715 hyphenation exceptions out of 8191 @@ -695,9 +691,9 @@ Files (x86)/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr9.pfb><C:/Program File s (x86)/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmsltt10.pfb><C:/Program File s (x86)/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmti10.pfb><C:/Program Files (x86)/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmtt10.pfb> -Output written on dataRetrieval.pdf (30 pages, 470824 bytes). +Output written on dataRetrieval.pdf (29 pages, 469489 bytes). PDF statistics: - 455 PDF objects out of 1000 (max. 8388607) - 84 named destinations out of 1000 (max. 500000) + 451 PDF objects out of 1000 (max. 8388607) + 83 named destinations out of 1000 (max. 500000) 270 words of extra memory for PDF output out of 10000 (max. 10000000) diff --git a/inst/doc/dataRetrieval.pdf b/inst/doc/dataRetrieval.pdf index 5d41513c50afcea16bcf4de8d83e7184a8928316..2e7205efc29d66ab8b775b770400b32c4066f6f6 100644 Binary files a/inst/doc/dataRetrieval.pdf and b/inst/doc/dataRetrieval.pdf differ diff --git a/inst/doc/dataRetrieval.synctex.gz b/inst/doc/dataRetrieval.synctex.gz index ab345af9a38503e21930525b5b235c96add42dfe..7caadbef7b28a24e6ee263d38c3a4920feaaf1f4 100644 Binary files a/inst/doc/dataRetrieval.synctex.gz and b/inst/doc/dataRetrieval.synctex.gz differ diff --git a/inst/doc/dataRetrieval.tex b/inst/doc/dataRetrieval.tex index e5d8210b5ab16b3b4bfc3ad5ebf9aedafc71c0e4..c47b3e55dddaf4cf31a6b8cfb8b88429e063e692 100644 --- a/inst/doc/dataRetrieval.tex +++ b/inst/doc/dataRetrieval.tex @@ -86,7 +86,7 @@ Not every station will measure all parameters. A short list of commonly measured % latex table generated in R 2.15.3 by xtable 1.7-1 package -% Thu Mar 14 17:51:22 2013 +% Thu Mar 28 14:04:21 2013 \begin{table}[!ht] \centering \caption{Common USGS Parameter Codes} @@ -109,7 +109,7 @@ For real-time data, the parameter code and site ID will suffice. For most varia Some common stat codes are shown in Table \ref{tab:stat}. % latex table generated in R 2.15.3 by xtable 1.7-1 package -% Thu Mar 14 17:51:22 2013 +% Thu Mar 28 14:04:21 2013 \begin{table}[!ht] \centering \caption{Commonly found USGS Stat Codes} @@ -176,7 +176,7 @@ To find out the available data at a particular USGS site, including measured par 2 00010 00001 1988-10-01 2012-06-24 940 dv 3 00010 00002 2010-10-01 2012-06-24 575 dv 4 00010 00003 2010-10-01 2012-06-24 575 dv -5 00060 00003 1948-01-01 2013-03-13 23814 dv +5 00060 00003 1948-01-01 2013-03-27 23828 dv 6 00095 00001 2010-10-01 2012-06-24 551 dv 7 00095 00002 2010-10-01 2012-06-24 551 dv \end{Soutput} @@ -224,7 +224,7 @@ The daily data at the Choptank River site can be displayed in a \LaTeX table usi caption.placement="top",include.rownames=FALSE) \end{Sinput} % latex table generated in R 2.15.3 by xtable 1.7-1 package -% Thu Mar 14 17:51:27 2013 +% Thu Mar 28 14:04:26 2013 \begin{table}[ht] \centering \caption{Daily mean data availabile at the Choptank River} @@ -234,7 +234,7 @@ The daily data at the Choptank River site can be displayed in a \LaTeX table usi shortName & Start & End & Count & Units \\ \hline Temperature, water & 2010-10-01 & 2012-06-24 & 575 & deg C \\ - Stream flow, mean. daily & 1948-01-01 & 2013-03-13 & 23814 & cfs \\ + Stream flow, mean. daily & 1948-01-01 & 2013-03-27 & 23828 & cfs \\ Specific conductance & 2010-10-01 & 2012-06-24 & 551 & uS/cm @25C \\ Suspended sediment concentration (SSC) & 1980-10-01 & 1991-09-30 & 3651 & mg/l \\ Suspended sediment discharge & 1980-10-01 & 1991-09-30 & 3652 & tons/day \\ @@ -291,19 +291,6 @@ The dates (start and end) need to be in the format \texttt{"}YYYY-MM-DD\texttt{" \end{Sinput} \end{Schunk} -A dataframe is returned that looks like the following: -\begin{Schunk} -\begin{Soutput} - agency_cd site_no datetime X02_00060_00003 X02_00060_00003_cd -1 USGS 01491000 1948-01-01 190 A -2 USGS 01491000 1948-01-02 900 A -3 USGS 01491000 1948-01-03 480 A -4 USGS 01491000 1948-01-04 210 A -5 USGS 01491000 1948-01-05 210 A -6 USGS 01491000 1948-01-06 220 A -\end{Soutput} -\end{Schunk} - The variable datetime is automatically imported as a Date. Each requested parameter has a value and remark code column. The names of these columns depend on the requested parameter and stat code combinations. USGS remark codes are often \texttt{"}A\texttt{"} (approved for publication) or \texttt{"}P\texttt{"} (provisional data subject to revision). A more complete list of remark codes can be found here: \url{http://waterdata.usgs.gov/usa/nwis/help?codes_help} @@ -316,6 +303,7 @@ Another example that doesn't use the defaults would be a request for mean and ma > endDate <- "2012-06-30" > temperatureAndFlow <- retrieveNWISData(siteNumber, parameterCd, startDate, endDate, StatCd=statCd,interactive=FALSE) +> \end{Sinput} \end{Schunk} @@ -325,13 +313,14 @@ An example of plotting the above data (Figure \ref{fig:TD}): \begin{Schunk} \begin{Sinput} +> colnames <- names(temperatureAndFlow) > with(temperatureAndFlow, plot( - datetime, X01_00010_00003, + get(colnames[3]), get(colnames[6]), xlab="Date",ylab="Temperature [C]" )) > par(new=TRUE) > with(temperatureAndFlow, plot( - datetime, X02_00060_00003, + get(colnames[3]), get(colnames[8]), col="red",type="l",xaxt="n",yaxt="n",xlab="",ylab="",axes=FALSE )) > axis(4,col="red",col.axis="red") @@ -362,9 +351,9 @@ Any data that are collected at regular time intervals (such as 15-minute or hour \begin{Schunk} \begin{Sinput} > parameterCd <- "00060" # Discharge (cfs) -> startDate <- "2013-03-12" +> startDate <- "2012-05-12" > # or use (yesterday): startDate <- as.character(Sys.Date()-1) -> endDate <- "2013-03-13" +> endDate <- "2012-05-13" > # or use (today): endDate <- as.character(Sys.Date()) > dischargeToday <- retrieveUnitNWISData(siteNumber, parameterCd, startDate, endDate) @@ -373,13 +362,13 @@ Any data that are collected at regular time intervals (such as 15-minute or hour Which produces the following dataframe: \begin{Schunk} \begin{Soutput} - agency_cd site_no datetime tz_cd X02_00060 X02_00060_cd -1 USGS 01491000 2013-03-12 00:00:00 EST 190 P -2 USGS 01491000 2013-03-12 00:15:00 EST 187 P -3 USGS 01491000 2013-03-12 00:30:00 EST 187 P -4 USGS 01491000 2013-03-12 00:45:00 EST 187 P -5 USGS 01491000 2013-03-12 01:00:00 EST 192 P -6 USGS 01491000 2013-03-12 01:15:00 EST 184 P + agency site dateTime X02_00060_00011 X02_00060_00011_cd +1 USGS 01491000 2012-05-12 00:00:00 83 A +2 USGS 01491000 2012-05-12 00:15:00 83 A +3 USGS 01491000 2012-05-12 00:30:00 83 A +4 USGS 01491000 2012-05-12 00:45:00 83 A +5 USGS 01491000 2012-05-12 01:00:00 85 A +6 USGS 01491000 2012-05-12 01:15:00 83 A \end{Soutput} \end{Schunk} @@ -388,11 +377,13 @@ Note that time now becomes important, so the variable datetime is a POSIXct, and A simple plotting example is shown in Figure \ref{fig:RT}: \begin{Schunk} \begin{Sinput} +> colnames <- names(dischargeToday) > with(dischargeToday, plot( - datetime, X02_00060, + get(colnames[3]), get(colnames[4]), ylab="Discharge [cfs]",xlab="" )) > title(ChoptankInfo$station.nm) +> \end{Sinput} \end{Schunk} \newpage @@ -401,7 +392,7 @@ A simple plotting example is shown in Figure \ref{fig:RT}: \begin{center} \includegraphics{dataRetrieval-fig2} \end{center} -\caption{Real-time discharge plot of Choptank River from March 12-13, 2013.} +\caption{Real-time discharge plot of Choptank River from May 12-13, 2012.} \label{fig:RT} \end{figure} @@ -426,8 +417,8 @@ To get USGS water quality data from water samples collected at the streamgage (a > names(dissolvedNitrateSimple) \end{Sinput} \begin{Soutput} -[1] "dateTime" "qualifier.71851" "value.71851" "qualifier.00618" -[5] "value.00618" +[1] "dateTime" "qualifier.00618" "value.00618" "qualifier.71851" +[5] "value.71851" \end{Soutput} \end{Schunk} Note that in this dataframe, datetime is imported as Dates (no times are included), and the qualifier is either blank or \texttt{"}\verb@<@\texttt{"} signifying a censored value. A plotting example is shown in Figure \ref{fig:nitrate}. @@ -537,7 +528,7 @@ The function to obtain the daily values (discharge in this case) is getDVData. Details of the Daily dataframe are listed below: % latex table generated in R 2.15.3 by xtable 1.7-1 package -% Thu Mar 14 17:51:38 2013 +% Thu Mar 28 14:04:42 2013 \begin{tabular}{llll} \hline ColumnName & Type & Description & Units \\ @@ -575,7 +566,7 @@ The function to obtain sample data from the water quality portal is getSampleDat Details of the Sample dataframe are listed below: % latex table generated in R 2.15.3 by xtable 1.7-1 package -% Thu Mar 14 17:51:40 2013 +% Thu Mar 28 14:04:43 2013 \begin{table}[!ht] \centering \caption{Sample dataframe} @@ -612,7 +603,7 @@ As an example to understand how the dataRetrieval package handles a more complex \begin{center} % latex table generated in R 2.15.3 by xtable 1.7-1 package -% Thu Mar 14 17:51:40 2013 +% Thu Mar 28 14:04:43 2013 \begin{tabular}{llrlrlr} \hline cdate & rdp & dp & rpp & pp & rtp & tp \\ @@ -750,13 +741,13 @@ Finally, there is a function called mergeReport that will look at both the Daily 4 1979-12-05 1.40 1.40 1 1.40 47454 12 339 1979.925 1560 5 1979-12-21 1.20 1.20 1 1.20 47470 12 355 1979.969 1560 6 1980-01-24 0.84 0.84 1 0.84 47504 1 24 1980.064 1561 - SinDY CosDY Q LogQ -1 0.4699767 -0.8826788 3.256437 1.180634 -2 -0.9927882 -0.1198812 3.398022 1.223193 -3 -0.9295235 0.3687629 3.199804 1.163089 -4 -0.4547551 0.8906165 2.973269 1.089662 -5 -0.1961425 0.9805754 2.944952 1.080093 -6 0.3925740 0.9197204 10.901986 2.388945 + SinDY CosDY Q LogQ +1 0.4699767 -0.8826788 3.341388 1.206386 +2 -0.9927882 -0.1198812 4.275844 1.452981 +3 -0.9295235 0.3687629 2.944952 1.080093 +4 -0.4547551 0.8906165 3.086536 1.127050 +5 -0.1961425 0.9805754 3.058219 1.117833 +6 0.3925740 0.9197204 9.089708 2.207143 \end{Soutput} \end{Schunk} @@ -875,7 +866,7 @@ To then open the library, simply type: %------------------------------------------------------------ % latex table generated in R 2.15.3 by xtable 1.7-1 package -% Thu Mar 14 17:51:44 2013 +% Thu Mar 28 14:04:54 2013 \begin{tabular}{l} \hline \hline @@ -933,7 +924,7 @@ agency.cd \\ There are 62 columns returned from the water quality portal. % latex table generated in R 2.15.3 by xtable 1.7-1 package -% Thu Mar 14 17:51:44 2013 +% Thu Mar 28 14:04:54 2013 \begin{tabular}{l} \hline \hline @@ -982,7 +973,7 @@ OrganizationIdentifier \\ \FloatBarrier % latex table generated in R 2.15.3 by xtable 1.7-1 package -% Thu Mar 14 17:51:44 2013 +% Thu Mar 28 14:04:54 2013 \begin{tabular}{l} \hline \hline diff --git a/inst/doc/dataRetrieval.toc b/inst/doc/dataRetrieval.toc index 4892dc38088891f3a7330a81f4516c16aeb11499..f05553d7aa44793f0a9945381c7f4fe909a895f7 100644 --- a/inst/doc/dataRetrieval.toc +++ b/inst/doc/dataRetrieval.toc @@ -7,25 +7,25 @@ \contentsline {subsubsection}{\numberline {2.2.2}getDataAvailability}{5}{subsubsection.2.2.2} \contentsline {subsection}{\numberline {2.3}Parameter Information}{6}{subsection.2.3} \contentsline {subsection}{\numberline {2.4}Daily Values}{7}{subsection.2.4} -\contentsline {subsection}{\numberline {2.5}Unit Values}{9}{subsection.2.5} -\contentsline {subsection}{\numberline {2.6}Water Quality Values}{11}{subsection.2.6} -\contentsline {subsection}{\numberline {2.7}STORET Water Quality Retrievals}{12}{subsection.2.7} -\contentsline {subsection}{\numberline {2.8}URL Construction}{13}{subsection.2.8} -\contentsline {section}{\numberline {3}Data Retrievals Structured For Use In The EGRET Package}{13}{section.3} -\contentsline {subsection}{\numberline {3.1}INFO Data}{14}{subsection.3.1} -\contentsline {subsection}{\numberline {3.2}Daily Data}{14}{subsection.3.2} -\contentsline {subsection}{\numberline {3.3}Sample Data}{15}{subsection.3.3} -\contentsline {subsection}{\numberline {3.4}Censored Values: Summation Explanation}{16}{subsection.3.4} -\contentsline {subsection}{\numberline {3.5}User-Generated Data Files}{17}{subsection.3.5} -\contentsline {subsubsection}{\numberline {3.5.1}getDailyDataFromFile}{17}{subsubsection.3.5.1} -\contentsline {subsubsection}{\numberline {3.5.2}getSampleDataFromFile}{18}{subsubsection.3.5.2} -\contentsline {subsection}{\numberline {3.6}Merge Report}{19}{subsection.3.6} -\contentsline {subsection}{\numberline {3.7}EGRET Plots}{20}{subsection.3.7} -\contentsline {section}{\numberline {A}Getting Started in R}{22}{appendix.A} -\contentsline {subsection}{\numberline {A.1}New to R?}{22}{subsection.A.1} -\contentsline {subsection}{\numberline {A.2}R User: Installing dataRetrieval}{22}{subsection.A.2} -\contentsline {subsection}{\numberline {A.3}R Developers: Installing dataRetrieval from gitHub}{23}{subsection.A.3} -\contentsline {section}{\numberline {B}Columns Names}{25}{appendix.B} -\contentsline {subsection}{\numberline {B.1}INFO dataframe}{25}{subsection.B.1} -\contentsline {subsection}{\numberline {B.2}Water Quality Portal}{26}{subsection.B.2} -\contentsline {section}{\numberline {C}Creating tables in Microsoft from R}{28}{appendix.C} +\contentsline {subsection}{\numberline {2.5}Unit Values}{8}{subsection.2.5} +\contentsline {subsection}{\numberline {2.6}Water Quality Values}{10}{subsection.2.6} +\contentsline {subsection}{\numberline {2.7}STORET Water Quality Retrievals}{11}{subsection.2.7} +\contentsline {subsection}{\numberline {2.8}URL Construction}{12}{subsection.2.8} +\contentsline {section}{\numberline {3}Data Retrievals Structured For Use In The EGRET Package}{12}{section.3} +\contentsline {subsection}{\numberline {3.1}INFO Data}{13}{subsection.3.1} +\contentsline {subsection}{\numberline {3.2}Daily Data}{13}{subsection.3.2} +\contentsline {subsection}{\numberline {3.3}Sample Data}{14}{subsection.3.3} +\contentsline {subsection}{\numberline {3.4}Censored Values: Summation Explanation}{15}{subsection.3.4} +\contentsline {subsection}{\numberline {3.5}User-Generated Data Files}{16}{subsection.3.5} +\contentsline {subsubsection}{\numberline {3.5.1}getDailyDataFromFile}{16}{subsubsection.3.5.1} +\contentsline {subsubsection}{\numberline {3.5.2}getSampleDataFromFile}{17}{subsubsection.3.5.2} +\contentsline {subsection}{\numberline {3.6}Merge Report}{18}{subsection.3.6} +\contentsline {subsection}{\numberline {3.7}EGRET Plots}{19}{subsection.3.7} +\contentsline {section}{\numberline {A}Getting Started in R}{21}{appendix.A} +\contentsline {subsection}{\numberline {A.1}New to R?}{21}{subsection.A.1} +\contentsline {subsection}{\numberline {A.2}R User: Installing dataRetrieval}{21}{subsection.A.2} +\contentsline {subsection}{\numberline {A.3}R Developers: Installing dataRetrieval from gitHub}{22}{subsection.A.3} +\contentsline {section}{\numberline {B}Columns Names}{24}{appendix.B} +\contentsline {subsection}{\numberline {B.1}INFO dataframe}{24}{subsection.B.1} +\contentsline {subsection}{\numberline {B.2}Water Quality Portal}{25}{subsection.B.2} +\contentsline {section}{\numberline {C}Creating tables in Microsoft from R}{27}{appendix.C} diff --git a/man/checkStartEndDate.Rd b/man/checkStartEndDate.Rd index aa1aa87150fb5d96f1f4f053fd04972bebad9d9e..892f64cca9c0ad84ad4ad691484ae396ed210d2e 100644 --- a/man/checkStartEndDate.Rd +++ b/man/checkStartEndDate.Rd @@ -26,6 +26,6 @@ startDate <- '1985-01-01' endDate <- '1990-01-01' checkStartEndDate(startDate, endDate, interactive = FALSE) } -\keyword{flow} \keyword{WRTDS} +\keyword{flow} diff --git a/man/compressData.Rd b/man/compressData.Rd index 17d40a4d71f6d04dd298450d5fc90f0746fd515e..92d9134d44d9369c41a427c163d614c96601a8d5 100644 --- a/man/compressData.Rd +++ b/man/compressData.Rd @@ -36,6 +36,6 @@ value3 <- c(3,4,5) dataInput <- data.frame(dateTime, comment1, value1, comment2, value2, comment3, value3, stringsAsFactors=FALSE) compressData(dataInput, interactive=FALSE) } -\keyword{flow} \keyword{WRTDS} +\keyword{flow} diff --git a/man/constructNWISURL.Rd b/man/constructNWISURL.Rd index 7a4a78ff1b56100e2e5b56229dd29487617f6ee0..1cd8ce4840245552bab6a76276140032fffe20b8 100644 --- a/man/constructNWISURL.Rd +++ b/man/constructNWISURL.Rd @@ -3,7 +3,8 @@ \title{Construct NWIS url for data retrieval} \usage{ constructNWISURL(siteNumber, parameterCd, startDate, - endDate, service, statCd = "00003") + endDate, service, statCd = "00003", + interactive = FALSE) } \arguments{ \item{siteNumber}{string or vector of strings USGS site @@ -26,6 +27,10 @@ values are "dv" (daily values), "uv" (unit/instantaneous values), "qw" (water quality data), and "wqp" (water quality portal, which can include STORET).} + + \item{interactive}{logical Option for interactive mode. + If true, there is user interaction for error handling and + data checks.} } \value{ url string @@ -50,9 +55,9 @@ url_qw_single <- constructNWISURL(siteNumber,"34220",startDate,endDate,'qwdata') url_qw <- constructNWISURL(siteNumber,c('34247','30234','32104','34220'),startDate,endDate,'qwdata') url_wqp <- constructNWISURL(siteNumber,"34220",startDate,endDate,'wqp') } +\keyword{USGS} \keyword{data} \keyword{import} \keyword{service} -\keyword{USGS} \keyword{web} diff --git a/man/dataOverview.Rd b/man/dataOverview.Rd index c99da9b50f9d0142972deef2188cd549ca498cfd..6fe56a3ac2930bf546840bcbdb75fea354dadd3f 100644 --- a/man/dataOverview.Rd +++ b/man/dataOverview.Rd @@ -21,8 +21,8 @@ dataOverview(localDaily = exDaily, localSample = exSample) \seealso{ \code{\link{mergeReport}} } -\keyword{data} -\keyword{import} \keyword{USGS} \keyword{WRTDS} +\keyword{data} +\keyword{import} diff --git a/man/dateFormatCheck.Rd b/man/dateFormatCheck.Rd index 99532817221093d2a64e3ce0e6ac8e3e3aabd07b..dd75fee619a69001adad54bba538e9d5980ee496 100644 --- a/man/dateFormatCheck.Rd +++ b/man/dateFormatCheck.Rd @@ -18,6 +18,6 @@ date <- '1985-01-01' dateFormatCheck(date) } -\keyword{flow} \keyword{WRTDS} +\keyword{flow} diff --git a/man/formatCheckDate.Rd b/man/formatCheckDate.Rd index 0bf8637101b5ac2a8f016bcc8faccdc3edac4dfe..64c54b65061785ecf5741d3f1c4eac8c9ac3af0d 100644 --- a/man/formatCheckDate.Rd +++ b/man/formatCheckDate.Rd @@ -27,6 +27,6 @@ Date <- '1985-01-01' dateString <- 'StartDate' formatCheckDate(Date, dateString, interactive = FALSE) } -\keyword{flow} \keyword{WRTDS} +\keyword{flow} diff --git a/man/formatCheckParameterCd.Rd b/man/formatCheckParameterCd.Rd index 086bea0aa058edc05bb1775bf7025433c33b96ee..d1574546ed4940e46494b4c4bbd46bacce0da90e 100644 --- a/man/formatCheckParameterCd.Rd +++ b/man/formatCheckParameterCd.Rd @@ -23,6 +23,6 @@ pCode <- '01234' formatCheckParameterCd(pCode, interactive = FALSE) } -\keyword{flow} \keyword{WRTDS} +\keyword{flow} diff --git a/man/formatCheckSiteNumber.Rd b/man/formatCheckSiteNumber.Rd index 60a912a66d584e466306e309483b57e7a1f38d54..5d8b42cd9e9cb3a8d96bdf4d70ac01ec0fbe8a03 100644 --- a/man/formatCheckSiteNumber.Rd +++ b/man/formatCheckSiteNumber.Rd @@ -22,6 +22,6 @@ site<- '01234567' formatCheckSiteNumber(site, interactive = FALSE) } -\keyword{flow} \keyword{WRTDS} +\keyword{flow} diff --git a/man/getDVData.Rd b/man/getDVData.Rd index 00c4faca602080dadd5471d104db558a7dfccfa8..7dc0a25d34cf307103f25a063e3a4f770f2910c2 100644 --- a/man/getDVData.Rd +++ b/man/getDVData.Rd @@ -46,8 +46,8 @@ Daily <- getDVData('01594440','00060', '1985-01-01', '1985-03-31', interactive=F \code{\link{retrieveNWISData}}, \code{\link{populateDaily}} } -\keyword{data} -\keyword{import} \keyword{USGS} \keyword{WRTDS} +\keyword{data} +\keyword{import} diff --git a/man/getDailyDataFromFile.Rd b/man/getDailyDataFromFile.Rd index 95f1ece41ac37dce3485e090992a4e76fbc70cc5..2c8ded37b9a18f130b42c18ecc9f4d3787a3c696 100644 --- a/man/getDailyDataFromFile.Rd +++ b/man/getDailyDataFromFile.Rd @@ -40,9 +40,9 @@ filePath <- '~/RData/' # Sample format fileName <- 'ChoptankRiverFlow.txt' \dontrun{getDailyDataFromFile(filePath,fileName,separator="\\t")} } +\keyword{USGS} +\keyword{WRTDS} \keyword{data} \keyword{file} \keyword{import} -\keyword{USGS} -\keyword{WRTDS} diff --git a/man/getDataAvailability.Rd b/man/getDataAvailability.Rd index fd9d46033e9e1e6165f538fcf14a54ab1c79bf69..06dbf8e02217726e0d4a9cc9e24f837a4ac1eb38 100644 --- a/man/getDataAvailability.Rd +++ b/man/getDataAvailability.Rd @@ -31,9 +31,9 @@ # These examples require an internet connection to run availableData <- getDataAvailability('05114000',interactive=FALSE) } +\keyword{USGS} \keyword{data} \keyword{import} \keyword{service} -\keyword{USGS} \keyword{web} diff --git a/man/getMetaData.Rd b/man/getMetaData.Rd index 77a11bcff1f726b0ecde6225df4d5f1b3b21a8fe..fb57f7d818c177f9756645238dada84569867e04 100644 --- a/man/getMetaData.Rd +++ b/man/getMetaData.Rd @@ -39,10 +39,10 @@ # Automatically gets information about site 05114000 and temperature, no interaction with user INFO <- getMetaData('05114000','00010',interactive=FALSE) } +\keyword{USGS} +\keyword{WRTDS} \keyword{data} \keyword{import} \keyword{service} -\keyword{USGS} \keyword{web} -\keyword{WRTDS} diff --git a/man/getMultipleParameterNames.Rd b/man/getMultipleParameterNames.Rd index 3177e1b6c5b0b27172ec344fff2391cee52d5489..dc266131310a138046da77d2b30e5bf2c1c45482 100644 --- a/man/getMultipleParameterNames.Rd +++ b/man/getMultipleParameterNames.Rd @@ -28,9 +28,9 @@ # These examples require an internet connection to run availableData <- getMultipleParameterNames(c("00060", "00065", "00010"),interactive=FALSE) } +\keyword{USGS} \keyword{data} \keyword{import} \keyword{service} -\keyword{USGS} \keyword{web} diff --git a/man/getParameterInfo.Rd b/man/getParameterInfo.Rd index 6344c8980314b462fbeb13a1be1a227e0e06a434..fb9df67602ba06d11c33ae51c97619337e355980 100644 --- a/man/getParameterInfo.Rd +++ b/man/getParameterInfo.Rd @@ -28,9 +28,9 @@ paramINFO <- getParameterInfo('01075') paramINFO2 <- getParameterInfo('00931',interactive=FALSE) } +\keyword{USGS} \keyword{data} \keyword{import} \keyword{service} -\keyword{USGS} \keyword{web} diff --git a/man/getPreLoadedDailyData.Rd b/man/getPreLoadedDailyData.Rd index a39fbbe6d2b72f71d83137208ac0c65157e98722..8be9941cee8a1e22b9c42a2f1e1783955a01990b 100644 --- a/man/getPreLoadedDailyData.Rd +++ b/man/getPreLoadedDailyData.Rd @@ -28,7 +28,7 @@ \examples{ Daily <- getPreLoadedDailyData(ChoptankRiverFlow, interactive=FALSE) } +\keyword{WRTDS} \keyword{data} \keyword{import} -\keyword{WRTDS} diff --git a/man/getPreLoadedSampleData.Rd b/man/getPreLoadedSampleData.Rd index 50708517441fb2c28f93936156fd4fd6c024f9c7..1e8834a400df76773c56f0d66f2f281f4bffabf2 100644 --- a/man/getPreLoadedSampleData.Rd +++ b/man/getPreLoadedSampleData.Rd @@ -23,7 +23,7 @@ \examples{ Sample <- getPreLoadedSampleData(ChoptankRiverNitrate, interactive=FALSE) } +\keyword{WRTDS} \keyword{data} \keyword{import} -\keyword{WRTDS} diff --git a/man/getQWData.Rd b/man/getQWData.Rd index f38d6a2322478fb8c29957201f772fe36d05034b..8348de8d5e2cd018928e1498e8d0ce37842488d7 100644 --- a/man/getQWData.Rd +++ b/man/getQWData.Rd @@ -46,9 +46,9 @@ rawProcessedSample <- getQWData('01594440','01075', '1985-01-01', '1985-03-31') rawProcessedSampleAll <- getQWData('05114000','', '1985-01-01', '1985-03-31') rawProcessedSampleSelect <- getQWData('05114000','00915;00931', '1985-01-01', '1985-04-30', interactive=FALSE) } +\keyword{USGS} \keyword{data} \keyword{import} \keyword{service} -\keyword{USGS} \keyword{web} diff --git a/man/getRawQWData.Rd b/man/getRawQWData.Rd index a77fc37ffda4adb1e1bc2c75b3a3a5b26ab57a98..738023e62faec1f5e19e3f7973eb04b875e5d7d0 100644 --- a/man/getRawQWData.Rd +++ b/man/getRawQWData.Rd @@ -45,9 +45,9 @@ rawSample <- getRawQWData('01594440','01075', '1985-01-01', '1985-03-31') rawSampleAll <- getRawQWData('05114000','', '1985-01-01', '1985-03-31') rawSampleSelect <- getRawQWData('05114000',c('00915','00931'), '1985-01-01', '1985-04-30', interactive=FALSE) } +\keyword{USGS} \keyword{data} \keyword{import} \keyword{service} -\keyword{USGS} \keyword{web} diff --git a/man/getSampleData.Rd b/man/getSampleData.Rd index 782b13c6c3bf602196a178982319a1be56c4f766..f8fc6db8dd5b2a7f164977fe2e1c287b8eefcb84 100644 --- a/man/getSampleData.Rd +++ b/man/getSampleData.Rd @@ -46,8 +46,8 @@ Sample_Select <- getSampleData('05114000','00915;00931', '', '', interactive=FAL \code{\link{compressData}}, \code{\link{populateSampleColumns}} } -\keyword{data} -\keyword{import} \keyword{USGS} \keyword{WRTDS} +\keyword{data} +\keyword{import} diff --git a/man/getSampleDataFromFile.Rd b/man/getSampleDataFromFile.Rd index 34a0e31df6f8ab4745627cbc5afc3f4ea08c175f..f295b54c36bbffe76ecd4934edde2f67b6531f51 100644 --- a/man/getSampleDataFromFile.Rd +++ b/man/getSampleDataFromFile.Rd @@ -35,9 +35,9 @@ filePath <- '~/RData/' # Sample format fileName <- 'ChoptankRiverNitrate.csv' #Sample <- getSampleDataFromFile(filePath,fileName, separator=";",interactive=FALSE) } +\keyword{USGS} +\keyword{WRTDS} \keyword{data} \keyword{file} \keyword{import} -\keyword{USGS} -\keyword{WRTDS} diff --git a/man/getSiteFileData.Rd b/man/getSiteFileData.Rd index 53291b62e542ee7599124ff7866c16c95ed96e9a..37a7d14a54aa31799bcb74be2ebf6e8137323eac 100644 --- a/man/getSiteFileData.Rd +++ b/man/getSiteFileData.Rd @@ -24,9 +24,9 @@ # These examples require an internet connection to run siteINFO <- getSiteFileData('05114000',interactive=FALSE) } +\keyword{USGS} \keyword{data} \keyword{import} \keyword{service} -\keyword{USGS} \keyword{web} diff --git a/man/getWQPData.Rd b/man/getWQPData.Rd index 3f5c8e143044f445ad8c2d9c19f888cfaba54b7e..a3b275d477aa664bc684d798eb3b33d64ddcf9f5 100644 --- a/man/getWQPData.Rd +++ b/man/getWQPData.Rd @@ -43,9 +43,9 @@ getWQPData('USGS-01594440','Chloride', '', '') getWQPData('WIDNR_WQX-10032762','Specific conductance', '', '') } +\keyword{WQP} \keyword{data} \keyword{import} \keyword{service} \keyword{web} -\keyword{WQP} diff --git a/man/getWaterML1Data.Rd b/man/getWaterML1Data.Rd new file mode 100644 index 0000000000000000000000000000000000000000..c8cc08e7b825ada8063f05c23dac753d8e697e95 --- /dev/null +++ b/man/getWaterML1Data.Rd @@ -0,0 +1,33 @@ +\name{getWaterML1Data} +\alias{getWaterML1Data} +\title{Function to return data from the NWISWeb WaterML1.1 daily values service} +\usage{ + getWaterML1Data(obs_url) +} +\arguments{ + \item{obs_url}{string containing the url for the + retrieval} +} +\value{ + Daily a data frame containing columns 'Date' and + 'Discharge' +} +\description{ + This function accepts a url parameter that already + contains the desired NWIS site, parameter code, + statistic, startdate and enddate. It returns a data frame + containing "Date" and "Discharge" +} +\examples{ +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 <- constructNWISURL(sites,property,startDate,endDate,'dv') +data <- getWaterML1Data(obs_url) +urlMulti <- constructNWISURL("04085427",c("00060","00010"),startDate,endDate,'dv',statCd=c("00003","00001")) +multiData <- getWaterML1Data(urlMulti) +} + diff --git a/man/mergeReport.Rd b/man/mergeReport.Rd index 800f34ba5ab6684f1af1975045caad09cf96f825..5efff9d3878cddc49ca7a82527a2ece4d08a4f52 100644 --- a/man/mergeReport.Rd +++ b/man/mergeReport.Rd @@ -33,8 +33,8 @@ Sample <- mergeReport(interactive=FALSE) \code{\link{getDVData}}, \code{\link{populateSampleColumns}} } -\keyword{data} -\keyword{import} \keyword{USGS} \keyword{WRTDS} +\keyword{data} +\keyword{import} diff --git a/man/padVariable.Rd b/man/padVariable.Rd new file mode 100644 index 0000000000000000000000000000000000000000..cf3aee545f2616faa1b17dcc20135c43ea3b97f8 --- /dev/null +++ b/man/padVariable.Rd @@ -0,0 +1,28 @@ +\name{padVariable} +\alias{padVariable} +\title{Pad string with leading zeros} +\usage{ + padVariable(x, padTo) +} +\arguments{ + \item{x}{string} + + \item{padTo}{number Final desired length of the string} +} +\value{ + x string returned with leading zeros +} +\description{ + Function to pad a string with leading zeros. Useful for + parameter codes and USGS site IDs. +} +\examples{ +pCode <- '10' +correctPCode <- padVariable(pCode,5) +} +\keyword{USGS} +\keyword{data} +\keyword{import} +\keyword{service} +\keyword{web} + diff --git a/man/populateDaily.Rd b/man/populateDaily.Rd index e59aafb215c75061b4ac028d2c5a414956f109af..5722f563c0cd546c3c1cb92f01026ffb4690c6a3 100644 --- a/man/populateDaily.Rd +++ b/man/populateDaily.Rd @@ -33,6 +33,6 @@ Daily <- populateDaily(dataInput, 2, interactive=FALSE) \author{ Robert M. Hirsch \email{rhirsch@usgs.gov} } -\keyword{flow} \keyword{WRTDS} +\keyword{flow} diff --git a/man/processQWData.Rd b/man/processQWData.Rd index d5cc07572769a86d41ddf0ae9eb1f8082b06b5f6..660c8bb571bcef093ad463a30d4d779727da1c13 100644 --- a/man/processQWData.Rd +++ b/man/processQWData.Rd @@ -25,9 +25,9 @@ rawSample <- getRawQWData('01594440','01075', '1985-01-01', '1985-03-31') rawSampleSelect <- processQWData(rawSample) } +\keyword{USGS} \keyword{data} \keyword{import} \keyword{service} -\keyword{USGS} \keyword{web} diff --git a/man/retrieveNWISData.Rd b/man/retrieveNWISData.Rd index f973bd8b29a7e78e912f8c8a7ef32008d0eb5654..7260b72e5252aafdab9eac5fd5ce3a0541710d5d 100644 --- a/man/retrieveNWISData.Rd +++ b/man/retrieveNWISData.Rd @@ -47,9 +47,9 @@ rawDailyQ <- retrieveNWISData(siteNumber,pCode, startDate, endDate) rawDailyTemperature <- retrieveNWISData(siteNumber,'00010', startDate, endDate, StatCd='00001',interactive=FALSE) rawDailyQAndTempMeanMax <- retrieveNWISData(siteNumber,c('00010','00060'), startDate, endDate, StatCd=c('00001','00003'), interactive=FALSE) } +\keyword{USGS} \keyword{data} \keyword{import} \keyword{service} -\keyword{USGS} \keyword{web} diff --git a/man/retrieveNWISqwData.Rd b/man/retrieveNWISqwData.Rd index 4e5a169e402d4b4af02344a248be66f16508e587..254045c748b2520c03b207a717b6a2034639f995 100644 --- a/man/retrieveNWISqwData.Rd +++ b/man/retrieveNWISqwData.Rd @@ -44,9 +44,9 @@ data$dateTime <- as.Date(data$dateTime) compressedData <- compressData(data, interactive=interactive) Sample <- populateSampleColumns(compressedData) } +\keyword{USGS} \keyword{data} \keyword{import} \keyword{service} -\keyword{USGS} \keyword{web} diff --git a/man/retrieveUnitNWISData.Rd b/man/retrieveUnitNWISData.Rd index 5228b6abf6422ca473a5b364761c62350c086d65..4622f8dd8136872c8f58ed1f8cd1eafa15ae7f9b 100644 --- a/man/retrieveUnitNWISData.Rd +++ b/man/retrieveUnitNWISData.Rd @@ -42,9 +42,9 @@ EndDate <- as.character(Sys.Date()) # These examples require an internet connection to run rawData <- retrieveUnitNWISData(siteNumber,ParameterCd,StartDate,EndDate,interactive=FALSE) } +\keyword{USGS} \keyword{data} \keyword{import} \keyword{service} -\keyword{USGS} \keyword{web}