Skip to content
Snippets Groups Projects
Commit 84dece5e authored by Laura A DeCicco's avatar Laura A DeCicco
Browse files

Latest build changed the formatting a little. I'm not sure why.

parent 8a4f8094
No related branches found
No related tags found
No related merge requests found
Showing
with 150 additions and 199 deletions
......@@ -13,47 +13,6 @@ Copyright: This software is in the public domain because it contains materials
the United States Department of Interior. For more information, see the
official USGS copyright policy at
http://www.usgs.gov/visual-id/credit_usgs.html#copyright
Collate:
'tabbedDataRetrievals.R'
'retrieveNWISData.r'
'getQWData.r'
'getSiteFileData.r'
'getDataFromFile.r'
'getParameterInfo.r'
'checkStartEndDate.r'
'dateFormatCheck.r'
'formatCheckDate.r'
'formatCheckParameterCd.r'
'formatCheckSiteNumber.r'
'getQWDataFromFile.r'
'populateDaily.r'
'compressData.r'
'populateSampleColumns.r'
'populateDateColumns.r'
'populateConcentrations.r'
'populateSiteINFO.r'
'populateParameterINFO.r'
'removeDuplicates.r'
'getDVData.r'
'getDailyDataFromFile.r'
'getSampleData.r'
'getSampleDataFromFile.r'
'getMetaData.r'
'mergeReport.r'
'dataOverview.r'
'getWQPData.r'
'retrieveUnitNWISData.r'
'getRawQWData.r'
'retrieveNWISqwData.r'
'processQWData.r'
'constructNWISURL.r'
'getDataAvailability.r'
'getWaterML1Data.r'
'padVariable.r'
'getRDB1Data.r'
'getSTORETSampleData.R'
'getWaterML2Data.r'
'renameColumns.R'
Depends:
R (>= 3.0)
Imports:
......
......@@ -3,14 +3,13 @@
\alias{ChoptankRiverFlow}
\title{Example Streamflow Data included in dataRetrieval}
\description{
Example data representing Streamflow and Nitrate from the
Choptank River at Greensboro, MD, USGS data
Example data representing Streamflow and Nitrate from the
Choptank River at Greensboro, MD, USGS data
}
\author{
Robert M. Hirsch \email{rhirsch@usgs.gov}
Robert M. Hirsch \email{rhirsch@usgs.gov}
}
\keyword{data}
\keyword{datasets}
\keyword{flow}
\keyword{water}
......@@ -3,16 +3,15 @@
\alias{ChoptankRiverNitrate}
\title{Example Water Quality Data included in dataRetrieval}
\description{
Example data representing Nitrate from the Choptank River
at Greensboro, MD, USGS data
\if{html}{\figure{Chop1.png}{Example Data}}
\if{latex}{\figure{Chop1.png}}
Example data representing Nitrate from the Choptank River
at Greensboro, MD, USGS data
\if{html}{\figure{Chop1.png}{Example Data}}
\if{latex}{\figure{Chop1.png}}
}
\author{
Robert M. Hirsch \email{rhirsch@usgs.gov}
Robert M. Hirsch \email{rhirsch@usgs.gov}
}
\keyword{data}
\keyword{datasets}
\keyword{quality}
\keyword{water}
......@@ -2,7 +2,7 @@
\alias{checkStartEndDate}
\title{checkStartEndDate}
\usage{
checkStartEndDate(StartDate, EndDate, interactive = TRUE)
checkStartEndDate(StartDate, EndDate, interactive = TRUE)
}
\arguments{
\item{StartDate}{string}
......@@ -14,12 +14,12 @@
data checks.}
}
\value{
vector where first value is StartDate, second is EndDate
vector where first value is StartDate, second is EndDate
}
\description{
Checks that the start date is before the end date. If
not, it will give the user the opportunity to correct,
otherwise will create a warning.
Checks that the start date is before the end date. If not,
it will give the user the opportunity to correct, otherwise
will create a warning.
}
\examples{
startDate <- '1985-01-01'
......
......@@ -2,7 +2,7 @@
\alias{compressData}
\title{Compress sample data frame}
\usage{
compressData(data, interactive = TRUE)
compressData(data, interactive = TRUE)
}
\arguments{
\item{data}{dataframe contains at least dateTime, value,
......@@ -13,17 +13,17 @@
data checks.}
}
\value{
dataframe returnDataFrame data frame containing dateTime,
ConcHigh, ConcLow, Uncen, ConcAve
dataframe returnDataFrame data frame containing dateTime,
ConcHigh, ConcLow, Uncen, ConcAve
}
\description{
Using raw data that has at least dateTime, value, code,
populates the measured data portion of the Sample data
frame used in WRTDS ConcLow = Lower bound for an observed
concentration ConcHigh = Upper bound for an observed
concentration ConcAve = Average of ConcLow and ConcHigh.
If ConcLow is NA, then ConcAve = ConcHigh/2 Uncen = 1 if
uncensored, 0 if censored
Using raw data that has at least dateTime, value, code,
populates the measured data portion of the Sample data
frame used in WRTDS ConcLow = Lower bound for an observed
concentration ConcHigh = Upper bound for an observed
concentration ConcAve = Average of ConcLow and ConcHigh.
If ConcLow is NA, then ConcAve = ConcHigh/2 Uncen = 1 if
uncensored, 0 if censored
}
\examples{
dateTime <- c('1985-01-01', '1985-01-02', '1985-01-03')
......
......@@ -2,9 +2,8 @@
\alias{constructNWISURL}
\title{Construct NWIS url for data retrieval}
\usage{
constructNWISURL(siteNumber, parameterCd, startDate,
endDate, service, statCd = "00003", format = "xml",
interactive = TRUE)
constructNWISURL(siteNumber, parameterCd, startDate, endDate, service,
statCd = "00003", format = "xml", interactive = TRUE)
}
\arguments{
\item{siteNumber}{string or vector of strings USGS site
......@@ -44,16 +43,16 @@
data checks.}
}
\value{
url string
url string
}
\description{
Imports data from NWIS web service. This function gets
the data from here:
\url{http://nwis.waterdata.usgs.gov/nwis/qwdata} A list
of parameter codes can be found here:
\url{http://nwis.waterdata.usgs.gov/nwis/pmcodes/} A list
of statistic codes can be found here:
\url{http://nwis.waterdata.usgs.gov/nwis/help/?read_file=stat&format=table}
Imports data from NWIS web service. This function gets the
data from here:
\url{http://nwis.waterdata.usgs.gov/nwis/qwdata} A list of
parameter codes can be found here:
\url{http://nwis.waterdata.usgs.gov/nwis/pmcodes/} A list
of statistic codes can be found here:
\url{http://nwis.waterdata.usgs.gov/nwis/help/?read_file=stat&format=table}
}
\examples{
siteNumber <- '01594440'
......
......@@ -2,7 +2,7 @@
\alias{dataOverview}
\title{Data Overview for WRTDS}
\usage{
dataOverview(localDaily = Daily, localSample = Sample)
dataOverview(localDaily = Daily, localSample = Sample)
}
\arguments{
\item{localDaily}{dataframe}
......@@ -10,7 +10,7 @@
\item{localSample}{dataframe}
}
\description{
Gives a summary of data to be used for WRTDS analysis
Gives a summary of data to be used for WRTDS analysis
}
\examples{
# These examples require an internet connection to run
......@@ -19,7 +19,7 @@ exSample <- getSampleData('01594440','01075', '1985-01-01', '1985-03-31', intera
dataOverview(localDaily = exDaily, localSample = exSample)
}
\seealso{
\code{\link{mergeReport}}
\code{\link{mergeReport}}
}
\keyword{USGS}
\keyword{WRTDS}
......
......@@ -3,33 +3,33 @@
\alias{dataRetrieval-package}
\title{Retrieval functions for USGS data}
\description{
\tabular{ll}{ Package: \tab dataRetrieval\cr Type: \tab
Package\cr Version: \tab 1.2.1\cr Date: \tab
2012-12-31\cr License: \tab Unlimited for this package,
dependencies have more restrictive licensing.\cr
Copyright: \tab This software is in the public domain
because it contains materials that originally came from
the United States Geological Survey, an agency of the
United States Department of Interior. For more
information, see the official USGS copyright policy at
http://www.usgs.gov/visual-id/credit_usgs.html#copyright\cr
LazyLoad: \tab yes\cr }
\tabular{ll}{ Package: \tab dataRetrieval\cr Type: \tab
Package\cr Version: \tab 1.2.1\cr Date: \tab 2012-12-31\cr
License: \tab Unlimited for this package, dependencies have
more restrictive licensing.\cr Copyright: \tab This
software is in the public domain because it contains
materials that originally came from the United States
Geological Survey, an agency of the United States
Department of Interior. For more information, see the
official USGS copyright policy at
http://www.usgs.gov/visual-id/credit_usgs.html#copyright\cr
LazyLoad: \tab yes\cr }
}
\details{
Collection of functions to help retrieve USGS data from
either web services or user provided data files.
Collection of functions to help retrieve USGS data from
either web services or user provided data files.
}
\author{
Robert M. Hirsch \email{rhirsch@usgs.gov}, Laura De Cicco
\email{ldecicco@usgs.gov}
Robert M. Hirsch \email{rhirsch@usgs.gov}, Laura De Cicco
\email{ldecicco@usgs.gov}
}
\references{
Hirsch, R. M., Moyer, D. L. and Archfield, S. A. (2010),
Weighted Regressions on Time, Discharge, and Season
(WRTDS), with an Application to Chesapeake Bay River
Inputs. JAWRA Journal of the American Water Resources
Association, 46: 857-880. doi:
10.1111/j.1752-1688.2010.00482.x
Hirsch, R. M., Moyer, D. L. and Archfield, S. A. (2010),
Weighted Regressions on Time, Discharge, and Season
(WRTDS), with an Application to Chesapeake Bay River
Inputs. JAWRA Journal of the American Water Resources
Association, 46: 857-880. doi:
10.1111/j.1752-1688.2010.00482.x
}
\keyword{data,}
\keyword{retrieval}
......
......@@ -2,17 +2,17 @@
\alias{dateFormatCheck}
\title{dateFormatCheck}
\usage{
dateFormatCheck(date)
dateFormatCheck(date)
}
\arguments{
\item{date}{string}
}
\value{
condition logical if TRUE,
condition logical if TRUE,
}
\description{
Checks to see if format is YYYY-MM-DD. Also performs a
few other date checks.
Checks to see if format is YYYY-MM-DD. Also performs a few
other date checks.
}
\examples{
date <- '1985-01-01'
......
......@@ -2,7 +2,7 @@
\alias{formatCheckDate}
\title{formatCheckDate}
\usage{
formatCheckDate(Date, dateString, interactive = TRUE)
formatCheckDate(Date, dateString, interactive = TRUE)
}
\arguments{
\item{Date}{string}
......@@ -15,12 +15,12 @@
data checks.}
}
\value{
condition logical if TRUE,
condition logical if TRUE,
}
\description{
Response to the date format checker. If the date is not
formated correctly, it will give the user the opportunity
to correct, otherwise will create a warning.
Response to the date format checker. If the date is not
formated correctly, it will give the user the opportunity
to correct, otherwise will create a warning.
}
\examples{
Date <- '1985-01-01'
......
......@@ -2,7 +2,7 @@
\alias{formatCheckParameterCd}
\title{formatCheckParameterCd}
\usage{
formatCheckParameterCd(ParameterCd, interactive = TRUE)
formatCheckParameterCd(ParameterCd, interactive = TRUE)
}
\arguments{
\item{ParameterCd}{string to check}
......@@ -12,12 +12,12 @@
data checks.}
}
\value{
ParameterCd string
ParameterCd string
}
\description{
Checks that the parameter code is 5 digits. If it is
less, it will pad the string with zeros. If more, ask the
user to re-enter.
Checks that the parameter code is 5 digits. If it is less,
it will pad the string with zeros. If more, ask the user to
re-enter.
}
\examples{
pCode <- '01234'
......
......@@ -2,7 +2,7 @@
\alias{formatCheckSiteNumber}
\title{formatCheckSiteNumber}
\usage{
formatCheckSiteNumber(siteNumber, interactive = TRUE)
formatCheckSiteNumber(siteNumber, interactive = TRUE)
}
\arguments{
\item{siteNumber}{string to check}
......@@ -12,15 +12,17 @@
data checks.}
}
\value{
siteNumber string
siteNumber string
}
\description{
Checks that the site code is 8 digits. If it is not 8
digits, it confirms with the user.
Checks that the site code is at least 8 digits. If not, it
confirms with the user.
}
\examples{
site<- '01234567'
formatCheckSiteNumber(site)
site_incorrect <- '1234567'
formatCheckSiteNumber(site_incorrect)
}
\keyword{WRTDS}
\keyword{flow}
......
......@@ -2,8 +2,8 @@
\alias{getDVData}
\title{Import Daily Data for WRTDS}
\usage{
getDVData(siteNumber, ParameterCd, StartDate, EndDate,
interactive = TRUE, convert = TRUE, format = "tsv")
getDVData(siteNumber, ParameterCd, StartDate, EndDate, interactive = TRUE,
convert = TRUE, format = "tsv")
}
\arguments{
\item{siteNumber}{string USGS site number. This is
......@@ -41,15 +41,15 @@
expected. The default is "tsv".}
}
\value{
Daily dataframe
Daily dataframe
}
\description{
Imports data from NWIS web service. This function gets
the data from here: \url{http://waterservices.usgs.gov/}
A list of parameter codes can be found here:
\url{http://nwis.waterdata.usgs.gov/nwis/pmcodes/} A list
of statistic codes can be found here:
\url{http://nwis.waterdata.usgs.gov/nwis/help/?read_file=stat&format=table}
Imports data from NWIS web service. This function gets the
data from here: \url{http://waterservices.usgs.gov/} A list
of parameter codes can be found here:
\url{http://nwis.waterdata.usgs.gov/nwis/pmcodes/} A list
of statistic codes can be found here:
\url{http://nwis.waterdata.usgs.gov/nwis/help/?read_file=stat&format=table}
}
\examples{
# These examples require an internet connection to run
......@@ -58,8 +58,7 @@ DailyCFS <- getDVData('01594440','00060', '1985-01-01', '1985-03-31',convert=FAL
DailySuspSediment <- getDVData('01594440','80154', '1985-01-01', '1985-03-31')
}
\seealso{
\code{\link{retrieveNWISData}},
\code{\link{populateDaily}}
\code{\link{retrieveNWISData}}, \code{\link{populateDaily}}
}
\keyword{USGS}
\keyword{WRTDS}
......
......@@ -2,9 +2,8 @@
\alias{getDailyDataFromFile}
\title{Import Daily Data for WRTDS}
\usage{
getDailyDataFromFile(filePath, fileName,
hasHeader = TRUE, separator = ",", qUnit = 1,
interactive = TRUE)
getDailyDataFromFile(filePath, fileName, hasHeader = TRUE, separator = ",",
qUnit = 1, interactive = TRUE)
}
\arguments{
\item{filePath}{string specifying the path to the file}
......@@ -26,12 +25,11 @@
data checks.}
}
\value{
Daily dataframe
Daily dataframe
}
\description{
Imports data from a user-supplied file, and converts it
to a Daily data frame, appropriate for WRTDS
calculations.
Imports data from a user-supplied file, and converts it to
a Daily data frame, appropriate for WRTDS calculations.
}
\examples{
# Examples of how to use getDailyDataFromFile:
......
......@@ -2,7 +2,7 @@
\alias{getDataAvailability}
\title{USGS data availability}
\usage{
getDataAvailability(siteNumber, interactive = TRUE)
getDataAvailability(siteNumber, interactive = TRUE)
}
\arguments{
\item{siteNumber}{string USGS site number. This is
......@@ -12,14 +12,14 @@
If true, a progress indicator is printed to the console.}
}
\value{
retval dataframe with all information found in the
expanded site file
retval dataframe with all information found in the expanded
site file
}
\description{
Imports a table of available parameters, period of
record, and count. There is also an option to load the
long parameter names and additional information on the
parameters with longNames=TRUE.
Imports a table of available parameters, period of record,
and count. There is also an option to load the long
parameter names and additional information on the
parameters with longNames=TRUE.
}
\examples{
# These examples require an internet connection to run
......
......@@ -2,8 +2,7 @@
\alias{getDataFromFile}
\title{Basic Data Import for Water Flow Data}
\usage{
getDataFromFile(filePath, fileName, hasHeader = TRUE,
separator = ",")
getDataFromFile(filePath, fileName, hasHeader = TRUE, separator = ",")
}
\arguments{
\item{filePath}{string specifying the path to the file}
......@@ -17,14 +16,14 @@
cells}
}
\value{
retval dataframe with dateTime, value, and code columns
retval dataframe with dateTime, value, and code columns
}
\description{
Imports data from user-supplied data file. Specifically
used to import water flow data for use in the WRTDS
package. For WRTDS usage, the first column is expected to
be dates, the second column measured values. The third
column is optional, it contains any remark codes.
Imports data from user-supplied data file. Specifically
used to import water flow data for use in the WRTDS
package. For WRTDS usage, the first column is expected to
be dates, the second column measured values. The third
column is optional, it contains any remark codes.
}
\examples{
# Examples of how to use getDataFromFile:
......
......@@ -2,8 +2,7 @@
\alias{getMetaData}
\title{Import Metadata for USGS Data}
\usage{
getMetaData(siteNumber = "", parameterCd = "",
interactive = TRUE)
getMetaData(siteNumber = "", parameterCd = "", interactive = TRUE)
}
\arguments{
\item{siteNumber}{string USGS site number. This is
......@@ -17,22 +16,22 @@
data checks.}
}
\value{
INFO dataframe with agency, site, dateTime, value, and
code columns
INFO dataframe with agency, site, dateTime, value, and code
columns
}
\description{
Populates INFO data frame for WRTDS study. If either
station number or parameter code supplied, imports data
about a particular USGS site from NWIS web service. This
function gets the data from here:
\url{http://waterservices.usgs.gov/} A list of parameter
codes can be found here:
\url{http://nwis.waterdata.usgs.gov/nwis/pmcodes/} If
either station number or parameter code is not supplied,
the user will be asked to input data. Additionally, the
user will be asked for: staAbbrev - station abbreviation,
will be used in naming output files and for structuring
batch jobs constitAbbrev - constitute abbreviation
Populates INFO data frame for WRTDS study. If either
station number or parameter code supplied, imports data
about a particular USGS site from NWIS web service. This
function gets the data from here:
\url{http://waterservices.usgs.gov/} A list of parameter
codes can be found here:
\url{http://nwis.waterdata.usgs.gov/nwis/pmcodes/} If
either station number or parameter code is not supplied,
the user will be asked to input data. Additionally, the
user will be asked for: staAbbrev - station abbreviation,
will be used in naming output files and for structuring
batch jobs constitAbbrev - constitute abbreviation
}
\examples{
# These examples require an internet connection to run
......
......@@ -2,7 +2,7 @@
\alias{getParameterInfo}
\title{USGS Parameter Data Retrieval}
\usage{
getParameterInfo(parameterCd, interactive = TRUE)
getParameterInfo(parameterCd, interactive = TRUE)
}
\arguments{
\item{parameterCd}{vector of USGS parameter codes. This
......@@ -13,15 +13,15 @@
data checks.}
}
\value{
parameterData dataframe with all information from the
USGS about the particular parameter (usually code, name,
short name, units, and CAS registry numbers)
parameterData dataframe with all information from the USGS
about the particular parameter (usually code, name, short
name, units, and CAS registry numbers)
}
\description{
Imports data from NWIS about meaured parameter based on
user-supplied parameter code. This function gets the data
from here:
\url{http://nwis.waterdata.usgs.gov/nwis/pmcodes}
Imports data from NWIS about meaured parameter based on
user-supplied parameter code. This function gets the data
from here:
\url{http://nwis.waterdata.usgs.gov/nwis/pmcodes}
}
\examples{
# These examples require an internet connection to run
......
......@@ -2,8 +2,7 @@
\alias{getQWData}
\title{Data Import for USGS NWIS Water Quality Data}
\usage{
getQWData(siteNumber, ParameterCd, StartDate, EndDate,
interactive = TRUE)
getQWData(siteNumber, ParameterCd, StartDate, EndDate, interactive = TRUE)
}
\arguments{
\item{siteNumber}{string USGS site number. This is
......@@ -26,19 +25,19 @@
data checks.}
}
\value{
retval dataframe with first column dateTime, and at least
one qualifier and value columns (subsequent
qualifier/value columns could follow depending on
requested parameter codes)
retval dataframe with first column dateTime, and at least
one qualifier and value columns (subsequent qualifier/value
columns could follow depending on requested parameter
codes)
}
\description{
Imports and processes data from NWIS web service. This
function gets the data from here:
\url{http://www.waterqualitydata.us} A list of parameter
codes can be found here:
\url{http://nwis.waterdata.usgs.gov/nwis/pmcodes/} A list
of statistic codes can be found here:
\url{http://nwis.waterdata.usgs.gov/nwis/help/?read_file=stat&format=table}
Imports and processes data from NWIS web service. This
function gets the data from here:
\url{http://www.waterqualitydata.us} A list of parameter
codes can be found here:
\url{http://nwis.waterdata.usgs.gov/nwis/pmcodes/} A list
of statistic codes can be found here:
\url{http://nwis.waterdata.usgs.gov/nwis/help/?read_file=stat&format=table}
}
\examples{
# These examples require an internet connection to run
......
......@@ -2,8 +2,7 @@
\alias{getQWDataFromFile}
\title{Basic Data Import}
\usage{
getQWDataFromFile(filePath, fileName, hasHeader = TRUE,
separator = ",")
getQWDataFromFile(filePath, fileName, hasHeader = TRUE, separator = ",")
}
\arguments{
\item{filePath}{string specifying the path to the file}
......@@ -17,16 +16,16 @@
cells}
}
\value{
retval dataframe
retval dataframe
}
\description{
Imports data from user-supplied data file. Specifically
used to import water quality data for use in the WRTDS
package. For WRTDS usage, the first column is expected to
be dates, the second column remarks (specifically < if
censored data), and the third column is measured values.
There can be additional columns of data, for each column
of data, there should be a remark column preceeding.
Imports data from user-supplied data file. Specifically
used to import water quality data for use in the WRTDS
package. For WRTDS usage, the first column is expected to
be dates, the second column remarks (specifically < if
censored data), and the third column is measured values.
There can be additional columns of data, for each column of
data, there should be a remark column preceeding.
}
\examples{
# Examples of how to use getQWDataFromFile:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment