diff --git a/NAMESPACE b/NAMESPACE index 300885d8eff5d0a35a54b439055030136ff3ae30..646d3a60f6768583ebd7377b10160968f7fd4e2c 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -27,4 +27,9 @@ export(processQWData) export(removeDuplicates) export(retrieveNWISData) export(retrieveUnitNWISData) +export(formatCheckDate) +export(checkStartEndDate) +export(dateFormatCheck) +export(formatCheckParameterCd) +export(formatCheckSiteNumber) import(zoo) diff --git a/dataRetrieval_1.2.1.tar.gz b/dataRetrieval_1.2.1.tar.gz index f9995cbc3a3b41cdf79c356f494cf3eab3d7822c..b657b452f488858f77d93a521f00dffce5c995cd 100644 Binary files a/dataRetrieval_1.2.1.tar.gz and b/dataRetrieval_1.2.1.tar.gz differ diff --git a/inst/doc/Rplots.pdf b/inst/doc/Rplots.pdf index 4931a81362221f292835a34a24222a3560ea7d07..ec964496e774e964bf3e6b870f803adbc6686b10 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 615800b9e4443f5dc7080bd3178d3440054c8f9e..80b38c212d3cb4ebd7f5bb8c4c4f44963ccf6169 100644 --- a/inst/doc/dataRetrieval-concordance.tex +++ b/inst/doc/dataRetrieval-concordance.tex @@ -7,7 +7,7 @@ 2 3 0 1 2 2 1 1 2 1 0 1 1 12 0 1 2 3 1 1 6 7 0 1 2 3 1 1 -5 1 9 21 1 1 % 2 1 0 3 1 1 2 7 0 2 1 1 2 11 0 1 1 19 0 1 2 18 1 1 3 5 0 1 2 2 1 1 4 6 % 0 1 2 2 1 1 4 6 0 1 2 3 1 1 2 4 0 1 2 6 1 1 2 1 0 1 1 3 0 1 2 1 1 1 2 4 % -0 1 2 4 1 1 2 1 0 1 2 3 1 4 0 1 3 3 1 1 2 1 0 1 1 49 0 1 2 3 1 1 2 1 0 % +0 1 2 5 1 1 2 1 0 1 2 3 1 4 0 1 3 3 1 1 2 4 0 1 3 50 0 1 2 4 1 1 2 1 0 % 1 1 12 0 1 2 3 1 1 2 1 0 1 1 47 0 1 2 3 1 1 2 1 0 3 1 1 3 1 0 1 1 15 0 % 1 2 3 1 1 2 1 0 1 1 1 2 1 0 1 3 2 0 1 1 12 0 1 2 3 1 1 2 1 0 2 1 7 0 1 % 1 18 0 1 2 3 1 1 2 1 0 2 1 68 0 1 2 3 1 1 2 1 0 1 1 17 0 1 2 3 1 1 2 1 % diff --git a/inst/doc/dataRetrieval-fig1.pdf b/inst/doc/dataRetrieval-fig1.pdf index 0745a5136e8d0eae0f43dc2e22428d8b89ae8ab6..29bd1c4868cb4358e481ebaf8cd1bfe531eb7cd7 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 3b5d6ce5a44984dcad0dbd7e071bad20fe69a2b7..c48360cb37125500875ac3401a38b367faa3e29f 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 2306508432bbc922d633eab7addcaf958a65851d..b98d7f0588f2e4a295155b4b810c548dcca99a38 100644 Binary files a/inst/doc/dataRetrieval-fig3.pdf and b/inst/doc/dataRetrieval-fig3.pdf differ diff --git a/inst/doc/dataRetrieval.Rnw b/inst/doc/dataRetrieval.Rnw index 5dfe79fb45e7cbdbfda619f485c9ec526d412801..3197a41cd2249a9d5ff7352e9126248f83014423 100644 --- a/inst/doc/dataRetrieval.Rnw +++ b/inst/doc/dataRetrieval.Rnw @@ -402,7 +402,7 @@ install_github("dataRetrieval", "USGS-R") @ To then open the library, simply type: -<<openLibrary>>= +<<openLibrary, eval=FALSE>>= library(dataRetrieval) @ @@ -424,11 +424,14 @@ endDate <- "2013-01-01" %------------------------------------------------------------ \subsection{getSiteFileData} %------------------------------------------------------------ -<<siteColnames, echo=TRUE>>= +<<siteColnames, echo=TRUE, eval=FALSE>>= ChoptankInfo <- getSiteFileData(siteNumber) +@ +<<siteColnames2, echo=TRUE, eval=TRUE>>= str(ChoptankInfo) @ + %------------------------------------------------------------ \subsection{getParameterInfo} %------------------------------------------------------------ diff --git a/inst/doc/dataRetrieval.log b/inst/doc/dataRetrieval.log index c72e0d63ea1e5180204ecea09b10d46c84599463..0bf9d2431808d9bb9dcf1890d792703144358082 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) 24 JAN 2013 10:22 +This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9) (preloaded format=pdflatex 2012.1.6) 24 JAN 2013 10:36 entering extended mode **dataRetrieval.tex (D:\LADData\RCode\dataRetrieval\inst\doc\dataRetrieval.tex @@ -550,19 +550,19 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [15] -LaTeX Font Info: Try loading font information for TS1+aett on input line 524 +LaTeX Font Info: Try loading font information for TS1+aett on input line 529 . (C:/PROGRA~1/R/R-215~1.2/share/texmf/tex/latex\ts1aett.fd File: ts1aett.fd ) -LaTeX Font Info: Try loading font information for TS1+cmtt on input line 524 +LaTeX Font Info: Try loading font information for TS1+cmtt on input line 529 . ("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/n' in size <10.95> not available -(Font) Font shape `TS1/cmtt/m/n' tried instead on input line 524. +(Font) Font shape `TS1/cmtt/m/n' tried instead on input line 529. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] @@ -588,23 +588,27 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [21] -Package atveryend Info: Empty hook `BeforeClearDocument' on input line 872. - Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [22] -Package atveryend Info: Empty hook `AfterLastShipout' on input line 872. +Package atveryend Info: Empty hook `BeforeClearDocument' on input line 878. + +Overfull \vbox (21.68121pt too high) has occurred while \output is active [] + + +[23] +Package atveryend Info: Empty hook `AfterLastShipout' on input line 878. (D:\LADData\RCode\dataRetrieval\inst\doc\dataRetrieval.aux) -Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 872. -Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 872. +Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 878. +Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 878. Package rerunfilecheck Info: File `dataRetrieval.out' has not changed. (rerunfilecheck) Checksum: 49D385C20E06E8D26BE2071E0704AEC8;1685. ) Here is how much of TeX's memory you used: - 7400 strings out of 494045 - 106081 string characters out of 3145961 - 191876 words of memory out of 3000000 + 7401 strings out of 494045 + 106088 string characters out of 3145961 + 193876 words of memory out of 3000000 10497 multiletter control sequences out of 15000+200000 40004 words of font info for 82 fonts, out of 3000000 for 9000 715 hyphenation exceptions out of 8191 @@ -621,9 +625,9 @@ Program Files (x86)/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr8.pfb><C:/Prog ram Files (x86)/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmsltt10.pfb><C:/Prog ram Files (x86)/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmti10.pfb><C:/Progra m Files (x86)/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmtt10.pfb> -Output written on dataRetrieval.pdf (22 pages, 292916 bytes). +Output written on dataRetrieval.pdf (23 pages, 293604 bytes). PDF statistics: - 331 PDF objects out of 1000 (max. 8388607) - 56 named destinations out of 1000 (max. 500000) + 335 PDF objects out of 1000 (max. 8388607) + 57 named destinations out of 1000 (max. 500000) 204 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 ce396d658c2f9dc4e3ba325867fb6a52658b1ce1..d1aa8ffceba0635a54bbdf088515bea7f8c388b2 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 235b4fd28f4705c084eba1a85e1e5e0e112c2e4d..1c564e2de13b3eae33c51ad55c23c212c4e58468 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 7dfb51e3b86f12ece2db08425a1e336ab71b9cb7..c494f912aef343938dac0f4c135bcea3793c9cba 100644 --- a/inst/doc/dataRetrieval.tex +++ b/inst/doc/dataRetrieval.tex @@ -81,7 +81,7 @@ Once the site-ID is known, the next required input for USGS data retrievals is t Not every station will measure all parameters. The following is a list of commonly measured parameters: % latex table generated in R 2.15.2 by xtable 1.7-0 package -% Thu Jan 24 10:22:25 2013 +% Thu Jan 24 10:35:50 2013 \begin{table}[ht] \begin{center} \caption{Commonly found USGS Parameter Codes} @@ -104,7 +104,7 @@ For real-time data, the parameter code and site ID will suffice. The USGS store The most common stat codes are: % latex table generated in R 2.15.2 by xtable 1.7-0 package -% Thu Jan 24 10:22:25 2013 +% Thu Jan 24 10:35:50 2013 \begin{table}[ht] \begin{center} \caption{Commonly found USGS Stat Codes} @@ -497,6 +497,7 @@ To then open the library, simply type: \end{Sinput} \end{Schunk} +\newpage %------------------------------------------------------------ \section{Appendix 2: Dataframe column names and data types} %------------------------------------------------------------ @@ -518,6 +519,10 @@ This section shows the returned dataframe structures for the functions. The req \begin{Schunk} \begin{Sinput} > ChoptankInfo <- getSiteFileData(siteNumber) +\end{Sinput} +\end{Schunk} +\begin{Schunk} +\begin{Sinput} > str(ChoptankInfo) \end{Sinput} \begin{Soutput} @@ -564,10 +569,11 @@ This section shows the returned dataframe structures for the functions. The req $ hole.depth.va : chr "" $ depth.src.cd : chr "" $ project.no : chr "442400300" - $ queryTime : POSIXct, format: "2013-01-24 10:22:34" + $ queryTime : POSIXct, format: "2013-01-24 10:35:51" \end{Soutput} \end{Schunk} + %------------------------------------------------------------ \subsection{getParameterInfo} %------------------------------------------------------------ @@ -630,7 +636,7 @@ This section shows the returned dataframe structures for the functions. The req $ local.time.fg : chr "N" $ reliability.cd : chr "" $ project.no : chr "442400300" - $ queryTime : POSIXct, format: "2013-01-24 10:22:35" + $ queryTime : POSIXct, format: "2013-01-24 10:36:02" $ drainSqKm : num 293 $ staAbbrev : logi NA $ param.nm : chr "Nitrate plus nitrite, water, filtered, milligrams per liter as nitrogen" @@ -683,7 +689,7 @@ This section shows the returned dataframe structures for the functions. The req > str(dischargeToday) \end{Sinput} \begin{Soutput} -'data.frame': 138 obs. of 6 variables: +'data.frame': 142 obs. of 6 variables: $ agency_cd : chr "USGS" "USGS" "USGS" "USGS" ... $ site_no : chr "01491000" "01491000" "01491000" "01491000" ... $ datetime : POSIXct, format: "2013-01-23 00:00:00" "2013-01-23 00:15:00" ... diff --git a/inst/doc/dataRetrieval.toc b/inst/doc/dataRetrieval.toc index 1ab6de533b27f64d8a0c50620cdf6e871569904d..d76af539f3acb9997b91ca38629ae922d6a30679 100644 --- a/inst/doc/dataRetrieval.toc +++ b/inst/doc/dataRetrieval.toc @@ -12,7 +12,7 @@ \contentsline {subsection}{\numberline {4.1}New to R?}{14}{subsection.4.1} \contentsline {subsection}{\numberline {4.2}R User: Installing dataRetrieval from downloaded binary}{14}{subsection.4.2} \contentsline {subsection}{\numberline {4.3}R Developers: Installing dataRetrieval from gitHub}{15}{subsection.4.3} -\contentsline {section}{\numberline {5}Appendix 2: Dataframe column names and data types}{15}{section.5} +\contentsline {section}{\numberline {5}Appendix 2: Dataframe column names and data types}{16}{section.5} \contentsline {subsection}{\numberline {5.1}getSiteFileData}{16}{subsection.5.1} \contentsline {subsection}{\numberline {5.2}getParameterInfo}{17}{subsection.5.2} \contentsline {subsection}{\numberline {5.3}getMetaData}{17}{subsection.5.3} @@ -20,5 +20,5 @@ \contentsline {subsection}{\numberline {5.5}retrieveUnitNWISData}{19}{subsection.5.5} \contentsline {subsection}{\numberline {5.6}getDVData}{19}{subsection.5.6} \contentsline {subsection}{\numberline {5.7}getRawQWData}{20}{subsection.5.7} -\contentsline {subsection}{\numberline {5.8}getQWData}{21}{subsection.5.8} +\contentsline {subsection}{\numberline {5.8}getQWData}{22}{subsection.5.8} \contentsline {subsection}{\numberline {5.9}getSampleData}{22}{subsection.5.9}