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

Added information of output.

parent e0442ff6
No related branches found
No related tags found
1 merge request!52Final updates for 2.0.1
...@@ -5,7 +5,18 @@ ...@@ -5,7 +5,18 @@
#' #'
#' @param parameterCd character of USGS parameter codes. This is usually an 5 digit number. #' @param parameterCd character of USGS parameter codes. This is usually an 5 digit number.
#' @keywords data import USGS web service #' @keywords data import USGS web service
#' @return parameterData dataframe with all information from the USGS about the particular parameter (usually code, name, short name, units, and CAS registry numbers) #' @return parameterData data frame with all information from the USGS about the particular parameter.
#'
#' \tabular{lll}{
#' Name \tab Type \tab Description\cr
#' parameter_cd \tab character \tab 5-digit USGS parameter code \cr
#' parameter_group_nm \tab character \tab USGS parameter group name\cr
#' parameter_nm \tab character \tab USGS parameter name\cr
#' casrn \tab character \tab Chemical Abstracts Service (CAS) Registry Number\cr
#' srsname \tab character \tab Substance Registry Services Name\cr
#' parameter_units \tab character \tab Parameter units\cr
#' }
#'
#' @export #' @export
#' @examples #' @examples
#' # These examples require an internet connection to run #' # These examples require an internet connection to run
......
...@@ -32,8 +32,23 @@ NULL ...@@ -32,8 +32,23 @@ NULL
#' format=rdb&show=parameter_group_nm&show=parameter_nm&show=casrn&show=srsname&show=parameter_units} #' format=rdb&show=parameter_group_nm&show=parameter_nm&show=casrn&show=srsname&show=parameter_units}
#' #'
#' @name parameterCdFile #' @name parameterCdFile
#' @return parameterData data frame with information about USGS parameters.
#'
#' \tabular{lll}{
#' Name \tab Type \tab Description\cr
#' parameter_cd \tab character \tab 5-digit USGS parameter code \cr
#' parameter_group_nm \tab character \tab USGS parameter group name\cr
#' parameter_nm \tab character \tab USGS parameter name\cr
#' casrn \tab character \tab Chemical Abstracts Service (CAS) Registry Number\cr
#' srsname \tab character \tab Substance Registry Services Name\cr
#' parameter_units \tab character \tab Parameter units\cr
#' }
#'
#' @docType data #' @docType data
#' @keywords USGS parameterCd #' @keywords USGS parameterCd
#' @examples
#' parameterCdFile <- parameterCdFile
#' dischargeInfo <- parameterCdFile[parameterCdFile$parameter_cd=="00060",]
NULL NULL
#' Data to convert USGS parameter code to characteristic names #' Data to convert USGS parameter code to characteristic names
...@@ -42,6 +57,26 @@ NULL ...@@ -42,6 +57,26 @@ NULL
#' \url{http://www.waterqualitydata.us/public_srsnames?mimeType=json}. #' \url{http://www.waterqualitydata.us/public_srsnames?mimeType=json}.
#' #'
#' @name pCodeToName #' @name pCodeToName
#' @return pCodeToName data frame with information about USGS parameters and how they
#' relate to characteristic names (useful for WQP requests).
#'
#' \tabular{lll}{
#' Name \tab Type \tab Description\cr
#' parm_cd \tab character \tab 5-digit USGS parameter code \cr
#' description \tab character \tab Parameter description\cr
#' characteristicname \tab character \tab Characteristic Name \cr
#' measureunitcode \tab character \tab Parameter units\cr
#' resultsamplefraction \tab character \tab Result sample fraction text\cr
#' resulttemperaturebasis \tab character \tab Temperature basis information\cr
#' resultstatisticalbasis \tab character \tab Statistical basis\cr
#' resulttimebasis \tab character \tab Time basis\cr
#' resultweightbasis \tab character \tab Weight basis\cr
#' resultparticlesizebasis \tab character \tab Particle size basis\cr
#' last_rev_dt \tab character \tab Latest revision of information\cr
#' }
#' @docType data #' @docType data
#' @keywords USGS parameterCd #' @keywords USGS parameterCd
#' @examples
#' pCodeToName <- pCodeToName
#' dischargeInfo <- pCodeToName[pCodeToName$parm_cd=="00060",]
NULL NULL
...@@ -3,10 +3,33 @@ ...@@ -3,10 +3,33 @@
\name{pCodeToName} \name{pCodeToName}
\alias{pCodeToName} \alias{pCodeToName}
\title{Data to convert USGS parameter code to characteristic names} \title{Data to convert USGS parameter code to characteristic names}
\value{
pCodeToName data frame with information about USGS parameters and how they
relate to characteristic names (useful for WQP requests).
\tabular{lll}{
Name \tab Type \tab Description\cr
parm_cd \tab character \tab 5-digit USGS parameter code \cr
description \tab character \tab Parameter description\cr
characteristicname \tab character \tab Characteristic Name \cr
measureunitcode \tab character \tab Parameter units\cr
resultsamplefraction \tab character \tab Result sample fraction text\cr
resulttemperaturebasis \tab character \tab Temperature basis information\cr
resultstatisticalbasis \tab character \tab Statistical basis\cr
resulttimebasis \tab character \tab Time basis\cr
resultweightbasis \tab character \tab Weight basis\cr
resultparticlesizebasis \tab character \tab Particle size basis\cr
last_rev_dt \tab character \tab Latest revision of information\cr
}
}
\description{ \description{
Data pulled from Water Quality Portal on November 25, 2014. The data was pulled from Data pulled from Water Quality Portal on November 25, 2014. The data was pulled from
\url{http://www.waterqualitydata.us/public_srsnames?mimeType=json}. \url{http://www.waterqualitydata.us/public_srsnames?mimeType=json}.
} }
\examples{
pCodeToName <- pCodeToName
dischargeInfo <- pCodeToName[pCodeToName$parm_cd=="00060",]
}
\keyword{USGS} \keyword{USGS}
\keyword{parameterCd} \keyword{parameterCd}
...@@ -3,11 +3,28 @@ ...@@ -3,11 +3,28 @@
\name{parameterCdFile} \name{parameterCdFile}
\alias{parameterCdFile} \alias{parameterCdFile}
\title{List of USGS parameter codes} \title{List of USGS parameter codes}
\value{
parameterData data frame with information about USGS parameters.
\tabular{lll}{
Name \tab Type \tab Description\cr
parameter_cd \tab character \tab 5-digit USGS parameter code \cr
parameter_group_nm \tab character \tab USGS parameter group name\cr
parameter_nm \tab character \tab USGS parameter name\cr
casrn \tab character \tab Chemical Abstracts Service (CAS) Registry Number\cr
srsname \tab character \tab Substance Registry Services Name\cr
parameter_units \tab character \tab Parameter units\cr
}
}
\description{ \description{
Complete list of USGS parameter codes as of November 7, 2014. The data was pulled from Complete list of USGS parameter codes as of November 7, 2014. The data was pulled from
\url{http://nwis.waterdata.usgs.gov/nwis/pmcodes/pmcodes?radio_pm_search=param_group&pm_group=All+--+include+all+parameter+groups& \url{http://nwis.waterdata.usgs.gov/nwis/pmcodes/pmcodes?radio_pm_search=param_group&pm_group=All+--+include+all+parameter+groups&
format=rdb&show=parameter_group_nm&show=parameter_nm&show=casrn&show=srsname&show=parameter_units} format=rdb&show=parameter_group_nm&show=parameter_nm&show=casrn&show=srsname&show=parameter_units}
} }
\examples{
parameterCdFile <- parameterCdFile
dischargeInfo <- parameterCdFile[parameterCdFile$parameter_cd=="00060",]
}
\keyword{USGS} \keyword{USGS}
\keyword{parameterCd} \keyword{parameterCd}
...@@ -9,7 +9,17 @@ readNWISpCode(parameterCd) ...@@ -9,7 +9,17 @@ readNWISpCode(parameterCd)
\item{parameterCd}{character of USGS parameter codes. This is usually an 5 digit number.} \item{parameterCd}{character of USGS parameter codes. This is usually an 5 digit number.}
} }
\value{ \value{
parameterData dataframe with all information from the USGS about the particular parameter (usually code, name, short name, units, and CAS registry numbers) parameterData data frame with all information from the USGS about the particular parameter.
\tabular{lll}{
Name \tab Type \tab Description\cr
parameter_cd \tab character \tab 5-digit USGS parameter code \cr
parameter_group_nm \tab character \tab USGS parameter group name\cr
parameter_nm \tab character \tab USGS parameter name\cr
casrn \tab character \tab Chemical Abstracts Service (CAS) Registry Number\cr
srsname \tab character \tab Substance Registry Services Name\cr
parameter_units \tab character \tab Parameter units\cr
}
} }
\description{ \description{
Imports data from NWIS about meaured parameter based on user-supplied parameter code. Imports data from NWIS about meaured parameter based on user-supplied parameter code.
......
...@@ -21,7 +21,8 @@ retrieval for the latest possible record.} ...@@ -21,7 +21,8 @@ retrieval for the latest possible record.}
remark_cd (remark code), result_va (result value), val_qual_tx (result value qualifier code), meth_cd (method code), remark_cd (remark code), result_va (result value), val_qual_tx (result value qualifier code), meth_cd (method code),
dqi_cd (data-quality indicator code), rpt_lev_va (reporting level), and rpt_lev_cd (reporting level type).} dqi_cd (data-quality indicator code), rpt_lev_va (reporting level), and rpt_lev_cd (reporting level type).}
\item{reshape}{logical. Will reshape the data if TRUE (default)} \item{reshape}{logical. Will reshape the data to a wide format if TRUE (default is FALSE). This is only
available for 'expanded' data.}
\item{tz}{character to set timezone attribute of datetime. Default is an empty quote, which converts the \item{tz}{character to set timezone attribute of datetime. Default is an empty quote, which converts the
datetimes to UTC (properly accounting for daylight savings times based on the data's provided tz_cd column). datetimes to UTC (properly accounting for daylight savings times based on the data's provided tz_cd column).
......
...@@ -21,6 +21,16 @@ columns are INDEP, typically the gage height, in feet; CORR, the correction ...@@ -21,6 +21,16 @@ columns are INDEP, typically the gage height, in feet; CORR, the correction
for that value; and CORRINDEP, the corrected value for CORR.\cr for that value; and CORRINDEP, the corrected value for CORR.\cr
If \code{type} is "base," then the data frame has an attribute called "RATING" If \code{type} is "base," then the data frame has an attribute called "RATING"
that describes the rating curve is included. that describes the rating curve is included.
There are also several useful attributes attached to the data frame:
\tabular{lll}{
Name \tab Type \tab Description \cr
url \tab character \tab The url used to generate the data \cr
queryTime \tab POSIXct \tab The time the data was returned \cr
comment \tab character \tab Header comments from the RDB file \cr
siteInfo \tab data.frame \tab A data frame containing information on the requested sites \cr
RATING \tab character \tab Rating information \cr
}
} }
\description{ \description{
Reads current rating table for an active USGS streamgage from NWISweb. Reads current rating table for an active USGS streamgage from NWISweb.
......
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