diff --git a/inst/doc/Rplots.pdf b/inst/doc/Rplots.pdf index b3e40e0eee7392df8044546d2f4012849c33efe5..46b2f1617b19364ed5cff6642d145a08bb58f5ab 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 152cb5ae9d761e22482942625a699abc2c177f42..81fc932fc119d7fde40b573d155b6eb0eaad427e 100644 --- a/inst/doc/dataRetrieval-concordance.tex +++ b/inst/doc/dataRetrieval-concordance.tex @@ -6,11 +6,11 @@ 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 % -3 0 1 2 2 1 1 -4 1 8 10 1 1 3 2 0 1 1 12 0 1 2 7 1 1 3 2 0 5 1 3 0 1 2 % -13 1 1 2 1 0 1 1 3 0 1 2 7 1 1 2 1 0 2 1 1 3 5 0 1 2 2 1 1 11 18 0 1 2 % -8 1 1 3 5 0 1 2 2 1 1 12 24 0 1 2 10 1 1 14 12 0 1 2 9 1 1 2 17 0 1 3 % -27 1 1 2 1 0 2 1 3 0 1 2 15 1 1 2 1 0 2 1 3 0 1 2 6 1 1 2 1 0 3 1 1 2 2 % +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 % +28 1 1 2 1 0 2 1 3 0 1 2 16 1 1 2 1 0 2 1 3 0 1 2 7 1 1 2 1 0 3 1 1 2 2 % 1 11 0 1 1 19 0 1 2 6 1 1 3 2 0 1 1 3 0 1 2 3 1 1 -5 1 9 21 1 1 2 4 0 1 % -2 1 1 1 2 13 0 1 2 6 1 1 2 1 0 1 1 3 0 1 2 3 1 1 2 4 0 1 2 7 1 1 2 1 0 % +2 1 1 1 2 12 0 1 2 6 1 1 2 1 0 1 1 3 0 1 2 3 1 1 2 4 0 1 2 7 1 1 2 1 0 % 1 1 3 0 1 2 1 1 1 2 4 0 1 2 10 1 1 5 47 0 1 2 9 1 1 6 45 0 1 2 2 1 1 6 % 27 0 1 2 8 1 1 2 1 0 4 1 1 9 10 0 1 2 3 1 1 3 5 0 1 2 53 1} diff --git a/inst/doc/dataRetrieval-fig1.pdf b/inst/doc/dataRetrieval-fig1.pdf index fcc2036fc0ffaec5c2ee8b26adb65ba0acb58264..69ec6765f5bb0932d2afe7a1b95e974238afabed 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 13d2e362db91e184765390aec0adf2313c0c8e52..631aacc290cedab7d509e298e625dddc85b21edf 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 66c388a084b5f3f9f0b14ba3df909fc0bee0e6a7..33c0f4820e24139ee94b744e2ca213a92047f9c7 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 361675f2e94a3cfd779b24b810a2603d579c749d..a3a2c62753ff3d9d87c6aaefda19fc7d528414e2 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 5d6c25a1b9fc30600673128fb04f7fa0480056ca..c0db6f453f3b1500b26b33c06361bae42bd4b2d6 100644 --- a/inst/doc/dataRetrieval.Rnw +++ b/inst/doc/dataRetrieval.Rnw @@ -101,7 +101,7 @@ data.df <- data.frame(pCode, shortName, stringsAsFactors=FALSE) data.table <- xtable(data.df,label="tab:params", caption="Common USGS Parameter Codes") print(data.table, - caption.placement="top",include.rownames=FALSE) + caption.placement="top",include.rownames=FALSE, table.placement="!ht") @ For real-time data, the parameter code and site ID will suffice. For most variables that are measured on a continuous basis, the USGS stores the historical data as daily values. These daily values may be in the form of statistics such as the daily mean values, but they can also include daily maximums, minimums or medians. These different statistics are specified by a 5-digit \texttt{"}stat code\texttt{"}. A complete list of stat codes can be found here: @@ -118,10 +118,10 @@ data.df <- data.frame(StatCode, shortName, stringsAsFactors=FALSE) data.table <- xtable(data.df,label="tab:stat", caption="Commonly found USGS Stat Codes") print(data.table, - caption.placement="top",include.rownames=FALSE) + caption.placement="top",include.rownames=FALSE, table.placement="!ht") @ - +\FloatBarrier %------------------------------------------------------------ \subsection{Site Information} \label{sec:usgsSite} @@ -147,7 +147,7 @@ A list of the available columns are found in Appendix \ref{sec:appendix2INFO}: I ChoptankInfo$station.nm @ Site information is obtained from \url{http://waterservices.usgs.gov/rest/Site-Test-Tool.html} - +\FloatBarrier %------------------------------------------------------------ \subsubsection{getDataAvailability} \label{sec:usgsDataAvailability} @@ -199,7 +199,7 @@ print(data.table, @ - +\FloatBarrier %------------------------------------------------------------ \subsection{Parameter Information} \label{sec:usgsParams} @@ -217,7 +217,7 @@ Pulling out a specific example piece of information, in this case parameter name parameterINFO$parameter_nm @ Parameter information is obtained from \url{http://nwis.waterdata.usgs.gov/nwis/pmcodes/} - +\FloatBarrier %------------------------------------------------------------ \subsection{Daily Values} \label{sec:usgsDaily} @@ -273,7 +273,7 @@ axis(4,col="red",col.axis="red") mtext("Discharge [cfs]",side=4,line=3,col="red") title(paste(ChoptankInfo$station.nm,"2012",sep=" ")) @ -\newpage + \begin{figure} \begin{center} @@ -288,7 +288,7 @@ title(paste(ChoptankInfo$station.nm,"2012",sep=" ")) There are occasions where NWIS values are not reported as numbers, instead there might be text describing a certain event such as \texttt{"}Ice\texttt{"}. Any value that cannot be converted to a number will be reported as NA in this package. - +\FloatBarrier %------------------------------------------------------------ \subsection{Unit Values} \label{sec:usgsRT} @@ -331,7 +331,7 @@ title(ChoptankInfo$station.nm) \label{fig:RT} \end{figure} - +\FloatBarrier %------------------------------------------------------------ \subsection{Water Quality Values} \label{sec:usgsWQP} @@ -374,6 +374,7 @@ title(ChoptankInfo$station.nm) \label{fig:nitrate} \end{figure} +\FloatBarrier %------------------------------------------------------------ \subsection{STORET Water Quality Retrievals} \label{sec:usgsSTORET} @@ -386,6 +387,7 @@ specificCond <- getWQPData('WIDNR_WQX-10032762', head(specificCond) @ +\FloatBarrier %------------------------------------------------------------ \subsection{URL Construction} \label{sec:usgsURL} @@ -403,7 +405,7 @@ url_dv <- constructNWISURL(siteNumber,"00060",startDate,endDate,'dv',statCd="000 url_uv <- constructNWISURL(siteNumber,"00060",startDate,endDate,'uv') @ - +\FloatBarrier %------------------------------------------------------------ \section{Data Retrievals Structured For Use In The EGRET Package} %------------------------------------------------------------ @@ -423,6 +425,7 @@ INFO <-getMetaData(siteNumber,parameterCd, interactive=FALSE) Column names in the INFO dataframe are listed in Appendix 2 (\ref{sec:appendix2INFO}). +\FloatBarrier %------------------------------------------------------------ \subsection{Daily Data} %------------------------------------------------------------ @@ -453,8 +456,9 @@ print(data.table, caption.placement="top",floating="FALSE",latex.environments=NU @ \\* -If there are discharge values of zero, the code will add a small constant to all of the daily discharges. This constant is 0.001 times the mean discharge. The code will also report on the number of zero values and the size of the constant. EGRET should only be used if the number of zero values is a very small fraction of the total days in the record (say less than 0.1\% of the days). Columns Q7 and Q30 are the 7 and 30 day running averages for the 7 or 30 days ending on this specific date." +If there are discharge values of zero, the code will add a small constant to all of the daily discharges. This constant is 0.001 times the mean discharge. The code will also report on the number of zero values and the size of the constant. EGRET should only be used if the number of zero values is a very small fraction of the total days in the record (say less than 0.1\% of the days). Columns Q7 and Q30 are the 7 and 30 day running averages for the 7 or 30 days ending on this specific date. +\FloatBarrier %------------------------------------------------------------ \subsection{Sample Data} %------------------------------------------------------------ @@ -482,10 +486,11 @@ print(data.table, caption.placement="top",include.rownames=FALSE,table.placement @ \footnotetext[1]{Flow columns are populated from data in the Daily dataframe after calling the mergeReport function.} +\FloatBarrier %------------------------------------------------------------ -\subsection{Censored Data Evaluation} +\subsection{Censored Values: Summation Explanation} %------------------------------------------------------------ -In the typical case where none of the data are censored (that is, no values are reported as \texttt{"}less-than\texttt{"} values) the ConcLow = ConcHigh = ConcAve all of which are equal to the reported value and Uncen=0. In the typical form of censoring where a value is reported as less than the reporting limit, then ConcLow = NA, ConcHigh = reporting limit, ConcAve = 0.5 * reporting limit, and Uncen = 1. The next section describes a more complex situation where concentrations are computed as the sum of one or more measured parameters. +In the typical case where none of the data are censored (that is, no values are reported as \texttt{"}less-than\texttt{"} values) the ConcLow = ConcHigh = ConcAve all of which are equal to the reported value and Uncen=0. In the typical form of censoring where a value is reported as less than the reporting limit, then ConcLow = NA, ConcHigh = reporting limit, ConcAve = 0.5 * reporting limit, and Uncen = 1. As an example to understand how the dataRetrieval package handles a more complex censoring problem, let us say that in 2004 and earlier, we computed a total phosphorus (tp) as the sum of dissolved phosphorus (dp) and particulate phosphorus (pp). From 2005 and onward, we have direct measurements of total phosphorus (tp). A small subset of this fictional data looks like this: @@ -521,6 +526,7 @@ getPreLoadedSampleData(DF) @ +\FloatBarrier %------------------------------------------------------------ \subsection{User-Generated Data Files} %------------------------------------------------------------ @@ -554,6 +560,7 @@ filePath <- "C:/RData/" Daily <- getDailyDataFromFile(filePath,fileName,separator="\t",interactive=FALSE) @ +\FloatBarrier %------------------------------------------------------------ \subsubsection{getSampleDataFromFile} %------------------------------------------------------------ @@ -575,6 +582,7 @@ filePath <- "C:/RData/" Sample <- getSampleDataFromFile(filePath,fileName,separator=",",interactive=FALSE) @ +\FloatBarrier %------------------------------------------------------------ \subsection{Merge Report} %------------------------------------------------------------ @@ -593,7 +601,7 @@ Sample <- mergeReport() head(Sample) @ - +\FloatBarrier %------------------------------------------------------------ \subsection{EGRET Plots} %------------------------------------------------------------ diff --git a/inst/doc/dataRetrieval.log b/inst/doc/dataRetrieval.log index 940993b2d02a876e6092b609346f14613c0031f4..a4b2780545799820219fa7e5976ab9b5be06cdbe 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 16:42 +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 entering extended mode **dataRetrieval.tex (D:\LADData\RCode\dataRetrieval\inst\doc\dataRetrieval.tex @@ -506,11 +506,7 @@ 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] -Overfull \vbox (21.68121pt too high) has occurred while \output is active [] - - -[8] <dataRetrieval-fig1.pdf, id=228, 433.62pt x 289.08pt> +[7] <dataRetrieval-fig1.pdf, id=223, 433.62pt x 289.08pt> File: dataRetrieval-fig1.pdf Graphic file (type pdf) <use dataRetrieval-fig1.pdf> @@ -520,6 +516,10 @@ Package pdftex.def Info: dataRetrieval-fig1.pdf used on input line 346. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] +[8] +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 [] @@ -542,24 +542,24 @@ File: dataRetrieval-fig3.pdf Graphic file (type pdf) Package pdftex.def Info: dataRetrieval-fig3.pdf used on input line 448. (pdftex.def) Requested size: 358.46039pt x 238.98355pt. -Overfull \hbox (0.79091pt too wide) in paragraph at lines 458--459 +Overfull \hbox (0.79091pt too wide) in paragraph at lines 459--460 \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 462 +LaTeX Font Info: Try loading font information for TS1+aett on input line 463 . (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 462 +LaTeX Font Info: Try loading font information for TS1+cmtt on input line 463 . ("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 462. +(Font) Font shape `TS1/cmtt/m/sl' tried instead on input line 463. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] @@ -570,7 +570,7 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [13] -Underfull \hbox (badness 10000) in paragraph at lines 538--556 +Underfull \hbox (badness 10000) in paragraph at lines 541--559 [] @@ -602,7 +602,7 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] File: dataRetrieval-figegretEx.pdf Graphic file (type pdf) <use dataRetrieval-figegretEx.pdf> -Package pdftex.def Info: dataRetrieval-figegretEx.pdf used on input line 772. +Package pdftex.def Info: dataRetrieval-figegretEx.pdf used on input line 780. (pdftex.def) Requested size: 358.46039pt x 358.47534pt. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] @@ -650,14 +650,14 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] ] <table1.png, id=361, 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 1070. +Package pdftex.def Info: table1.png used on input line 1077. (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 1092. +Package atveryend Info: Empty hook `BeforeClearDocument' on input line 1099. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] @@ -665,13 +665,13 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [30 ] -Package atveryend Info: Empty hook `AfterLastShipout' on input line 1092. +Package atveryend Info: Empty hook `AfterLastShipout' on input line 1099. (D:\LADData\RCode\dataRetrieval\inst\doc\dataRetrieval.aux) -Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 1092. -Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 1092. +Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 1099. +Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 1099. Package rerunfilecheck Info: File `dataRetrieval.out' has not changed. -(rerunfilecheck) Checksum: 13FFD1C75CB55F2DDE6E037E39171B97;2105. +(rerunfilecheck) Checksum: 3B1480473EC95CC4090ED48BB3268644;2119. ) Here is how much of TeX's memory you used: 7546 strings out of 494045 @@ -695,7 +695,7 @@ 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, 475780 bytes). +Output written on dataRetrieval.pdf (30 pages, 470824 bytes). PDF statistics: 455 PDF objects out of 1000 (max. 8388607) 84 named destinations out of 1000 (max. 500000) diff --git a/inst/doc/dataRetrieval.pdf b/inst/doc/dataRetrieval.pdf index 740b9d65e79c785e1510541e1bc8a0b7692daead..5d41513c50afcea16bcf4de8d83e7184a8928316 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 70b14830f956fab7f96ccc755e004bf7cf590d1c..ab345af9a38503e21930525b5b235c96add42dfe 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 802fc70d5a0d3f3af0b8aa147e3cafaecd8722ff..e5d8210b5ab16b3b4bfc3ad5ebf9aedafc71c0e4 100644 --- a/inst/doc/dataRetrieval.tex +++ b/inst/doc/dataRetrieval.tex @@ -86,8 +86,8 @@ 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 16:41:43 2013 -\begin{table}[ht] +% Thu Mar 14 17:51:22 2013 +\begin{table}[!ht] \centering \caption{Common USGS Parameter Codes} \label{tab:params} @@ -109,8 +109,8 @@ 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 16:41:43 2013 -\begin{table}[ht] +% Thu Mar 14 17:51:22 2013 +\begin{table}[!ht] \centering \caption{Commonly found USGS Stat Codes} \label{tab:stat} @@ -125,7 +125,7 @@ StatCode & shortName \\ \hline \end{tabular} \end{table} - +\FloatBarrier %------------------------------------------------------------ \subsection{Site Information} \label{sec:usgsSite} @@ -158,7 +158,7 @@ A list of the available columns are found in Appendix \ref{sec:appendix2INFO}: I \end{Soutput} \end{Schunk} Site information is obtained from \url{http://waterservices.usgs.gov/rest/Site-Test-Tool.html} - +\FloatBarrier %------------------------------------------------------------ \subsubsection{getDataAvailability} \label{sec:usgsDataAvailability} @@ -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 16:41:49 2013 +% Thu Mar 14 17:51:27 2013 \begin{table}[ht] \centering \caption{Daily mean data availabile at the Choptank River} @@ -243,7 +243,7 @@ Temperature, water & 2010-10-01 & 2012-06-24 & 575 & deg C \\ \end{table}\end{Schunk} - +\FloatBarrier %------------------------------------------------------------ \subsection{Parameter Information} \label{sec:usgsParams} @@ -272,7 +272,7 @@ Pulling out a specific example piece of information, in this case parameter name \end{Soutput} \end{Schunk} Parameter information is obtained from \url{http://nwis.waterdata.usgs.gov/nwis/pmcodes/} - +\FloatBarrier %------------------------------------------------------------ \subsection{Daily Values} \label{sec:usgsDaily} @@ -339,7 +339,7 @@ An example of plotting the above data (Figure \ref{fig:TD}): > title(paste(ChoptankInfo$station.nm,"2012",sep=" ")) \end{Sinput} \end{Schunk} -\newpage + \begin{figure} \begin{center} @@ -352,7 +352,7 @@ An example of plotting the above data (Figure \ref{fig:TD}): There are occasions where NWIS values are not reported as numbers, instead there might be text describing a certain event such as \texttt{"}Ice\texttt{"}. Any value that cannot be converted to a number will be reported as NA in this package. - +\FloatBarrier %------------------------------------------------------------ \subsection{Unit Values} \label{sec:usgsRT} @@ -405,7 +405,7 @@ A simple plotting example is shown in Figure \ref{fig:RT}: \label{fig:RT} \end{figure} - +\FloatBarrier %------------------------------------------------------------ \subsection{Water Quality Values} \label{sec:usgsWQP} @@ -417,7 +417,7 @@ To get USGS water quality data from water samples collected at the streamgage (a \begin{Sinput} > # Dissolved Nitrate parameter codes: > parameterCd <- c("00618","71851") -> startDate <- "1964-06-11" +> startDate <- "1979-10-11" > endDate <- "2012-12-18" > dissolvedNitrate <- getRawQWData(siteNumber, parameterCd, startDate, endDate) @@ -451,6 +451,7 @@ Note that in this dataframe, datetime is imported as Dates (no times are include \label{fig:nitrate} \end{figure} +\FloatBarrier %------------------------------------------------------------ \subsection{STORET Water Quality Retrievals} \label{sec:usgsSTORET} @@ -474,11 +475,12 @@ There are additional data sets available on the Water Quality Data Portal (\url{ \end{Soutput} \end{Schunk} +\FloatBarrier %------------------------------------------------------------ \subsection{URL Construction} \label{sec:usgsURL} %------------------------------------------------------------ -There may be times when you might be interested in seeing the URL (web address) that was used to obtain the raw data. The constructNWISURL function returns the URL. Aside from input variables that have already been described, there is a new argument \texttt{"}service\texttt{"}. The service argument can be \texttt{"}dv\texttt{"} (daily values), \texttt{"}uv\texttt{"} (unit values), \texttt{"}qw\texttt{"} (NWIS water quality values), \texttt{"}wqp\texttt{"} (general Water Quality Portal values). +There may be times when you might be interested in seeing the URL (web address) that was used to obtain the raw data. The constructNWISURL function returns the URL. Aside from input variables that have already been described, there is a new argument \texttt{"}service\texttt{"}. The service argument can be \texttt{"}dv\texttt{"} (daily values), \texttt{"}uv\texttt{"} (unit values), \texttt{"}qw\texttt{"} (NWIS water quality values), or \texttt{"}wqp\texttt{"} (general Water Quality Portal values). \begin{Schunk} @@ -493,7 +495,7 @@ There may be times when you might be interested in seeing the URL (web address) \end{Sinput} \end{Schunk} - +\FloatBarrier %------------------------------------------------------------ \section{Data Retrievals Structured For Use In The EGRET Package} %------------------------------------------------------------ @@ -515,6 +517,7 @@ The function to obtain metadata, or data about the streamgage and measured param Column names in the INFO dataframe are listed in Appendix 2 (\ref{sec:appendix2INFO}). +\FloatBarrier %------------------------------------------------------------ \subsection{Daily Data} %------------------------------------------------------------ @@ -534,7 +537,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 16:41:59 2013 +% Thu Mar 14 17:51:38 2013 \begin{tabular}{llll} \hline ColumnName & Type & Description & Units \\ @@ -554,8 +557,9 @@ Date & Date & Date & date \\ \hline \end{tabular}\\* -If there are discharge values of zero, the code will add a small constant to all of the daily discharges. This constant is 0.001 times the mean discharge. The code will also report on the number of zero values and the size of the constant. EGRET should only be used if the number of zero values is a very small fraction of the total days in the record (say less than 0.1\% of the days). Columns Q7 and Q30 are the 7 and 30 day running averages for the 7 or 30 days ending on this specific date." +If there are discharge values of zero, the code will add a small constant to all of the daily discharges. This constant is 0.001 times the mean discharge. The code will also report on the number of zero values and the size of the constant. EGRET should only be used if the number of zero values is a very small fraction of the total days in the record (say less than 0.1\% of the days). Columns Q7 and Q30 are the 7 and 30 day running averages for the 7 or 30 days ending on this specific date. +\FloatBarrier %------------------------------------------------------------ \subsection{Sample Data} %------------------------------------------------------------ @@ -571,7 +575,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 16:42:01 2013 +% Thu Mar 14 17:51:40 2013 \begin{table}[!ht] \centering \caption{Sample dataframe} @@ -597,17 +601,18 @@ Date & Date & Date & date \\ \end{tabular} \end{table}\footnotetext[1]{Flow columns are populated from data in the Daily dataframe after calling the mergeReport function.} +\FloatBarrier %------------------------------------------------------------ -\subsection{Censored Data Evaluation} +\subsection{Censored Values: Summation Explanation} %------------------------------------------------------------ -In the typical case where none of the data are censored (that is, no values are reported as \texttt{"}less-than\texttt{"} values) the ConcLow = ConcHigh = ConcAve all of which are equal to the reported value and Uncen=0. In the typical form of censoring where a value is reported as less than the reporting limit, then ConcLow = NA, ConcHigh = reporting limit, ConcAve = 0.5 * reporting limit, and Uncen = 1. The next section describes a more complex situation where concentrations are computed as the sum of one or more measured parameters. +In the typical case where none of the data are censored (that is, no values are reported as \texttt{"}less-than\texttt{"} values) the ConcLow = ConcHigh = ConcAve all of which are equal to the reported value and Uncen=0. In the typical form of censoring where a value is reported as less than the reporting limit, then ConcLow = NA, ConcHigh = reporting limit, ConcAve = 0.5 * reporting limit, and Uncen = 1. As an example to understand how the dataRetrieval package handles a more complex censoring problem, let us say that in 2004 and earlier, we computed a total phosphorus (tp) as the sum of dissolved phosphorus (dp) and particulate phosphorus (pp). From 2005 and onward, we have direct measurements of total phosphorus (tp). A small subset of this fictional data looks like this: \begin{center} % latex table generated in R 2.15.3 by xtable 1.7-1 package -% Thu Mar 14 16:42:01 2013 +% Thu Mar 14 17:51:40 2013 \begin{tabular}{llrlrlr} \hline cdate & rdp & dp & rpp & pp & rtp & tp \\ @@ -648,6 +653,7 @@ For the more complex example case, let us say dp is reported as <0.01 and pp is \end{Soutput} \end{Schunk} +\FloatBarrier %------------------------------------------------------------ \subsection{User-Generated Data Files} %------------------------------------------------------------ @@ -683,6 +689,7 @@ The call to open this file, convert the flow to cubic meters per second, and pop \end{Sinput} \end{Schunk} +\FloatBarrier %------------------------------------------------------------ \subsubsection{getSampleDataFromFile} %------------------------------------------------------------ @@ -706,6 +713,7 @@ The call to open this file, and populate the Sample dataframe would be: \end{Sinput} \end{Schunk} +\FloatBarrier %------------------------------------------------------------ \subsection{Merge Report} %------------------------------------------------------------ @@ -752,7 +760,7 @@ Finally, there is a function called mergeReport that will look at both the Daily \end{Soutput} \end{Schunk} - +\FloatBarrier %------------------------------------------------------------ \subsection{EGRET Plots} %------------------------------------------------------------ @@ -804,11 +812,10 @@ To see the raw code for a particular code, type the name of the function: > removeDuplicates \end{Sinput} \begin{Soutput} -function (localSample = Sample) -{ - Sample1 <- localSample[!duplicated(localSample[c("DecYear", - "ConcHigh")]), ] - return(Sample1) +function(localSample=Sample) { + Sample1 <- localSample[!duplicated(localSample[c("DecYear","ConcHigh")]),] + + return(Sample1) } <environment: namespace:dataRetrieval> \end{Soutput} @@ -868,7 +875,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 16:42:05 2013 +% Thu Mar 14 17:51:44 2013 \begin{tabular}{l} \hline \hline @@ -926,7 +933,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 16:42:05 2013 +% Thu Mar 14 17:51:44 2013 \begin{tabular}{l} \hline \hline @@ -975,7 +982,7 @@ OrganizationIdentifier \\ \FloatBarrier % latex table generated in R 2.15.3 by xtable 1.7-1 package -% Thu Mar 14 16:42:05 2013 +% Thu Mar 14 17:51:44 2013 \begin{tabular}{l} \hline \hline diff --git a/inst/doc/dataRetrieval.toc b/inst/doc/dataRetrieval.toc index 3fd8a595d90bed5ee4668f034a640a91d085bd73..4892dc38088891f3a7330a81f4516c16aeb11499 100644 --- a/inst/doc/dataRetrieval.toc +++ b/inst/doc/dataRetrieval.toc @@ -15,7 +15,7 @@ \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 Data Evaluation}{15}{subsection.3.4} +\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}