diff --git a/R/readNWISpCode.r b/R/readNWISpCode.r index 73a82ac13cf06c4f555cefa2e990d34021e7e2a7..416fa19f759c3e52eef228193ce97612dfef87b7 100644 --- a/R/readNWISpCode.r +++ b/R/readNWISpCode.r @@ -5,7 +5,18 @@ #' #' @param parameterCd character of USGS parameter codes. This is usually an 5 digit number. #' @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 #' @examples #' # These examples require an internet connection to run diff --git a/R/tabbedDataRetrievals.R b/R/tabbedDataRetrievals.R index 7c63acf4dcda39ee968d316b87908b078db9d79d..003bfe8acfbe82797635f0b7fa8bb05c6cdf09e9 100644 --- a/R/tabbedDataRetrievals.R +++ b/R/tabbedDataRetrievals.R @@ -32,8 +32,23 @@ NULL #' format=rdb&show=parameter_group_nm&show=parameter_nm&show=casrn&show=srsname&show=parameter_units} #' #' @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 #' @keywords USGS parameterCd +#' @examples +#' parameterCdFile <- parameterCdFile +#' dischargeInfo <- parameterCdFile[parameterCdFile$parameter_cd=="00060",] NULL #' Data to convert USGS parameter code to characteristic names @@ -42,6 +57,26 @@ NULL #' \url{http://www.waterqualitydata.us/public_srsnames?mimeType=json}. #' #' @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 #' @keywords USGS parameterCd +#' @examples +#' pCodeToName <- pCodeToName +#' dischargeInfo <- pCodeToName[pCodeToName$parm_cd=="00060",] NULL diff --git a/man/pCodeToName.Rd b/man/pCodeToName.Rd index 6c52a0168f329154ecdf304a1246c7b39990d5da..736284dac0add9d1846ac70b7c7fe87bd44d7ed3 100644 --- a/man/pCodeToName.Rd +++ b/man/pCodeToName.Rd @@ -3,10 +3,33 @@ \name{pCodeToName} \alias{pCodeToName} \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{ Data pulled from Water Quality Portal on November 25, 2014. The data was pulled from \url{http://www.waterqualitydata.us/public_srsnames?mimeType=json}. } +\examples{ +pCodeToName <- pCodeToName +dischargeInfo <- pCodeToName[pCodeToName$parm_cd=="00060",] +} \keyword{USGS} \keyword{parameterCd} diff --git a/man/parameterCdFile.Rd b/man/parameterCdFile.Rd index 0a75b0552ab5df4b1c7ec75b13b3c7d98cd871ae..4052d274888c8c77bd6628e592441bb4127da87d 100644 --- a/man/parameterCdFile.Rd +++ b/man/parameterCdFile.Rd @@ -3,11 +3,28 @@ \name{parameterCdFile} \alias{parameterCdFile} \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{ 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& 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{parameterCd} diff --git a/man/readNWISpCode.Rd b/man/readNWISpCode.Rd index 8ae5a668d8be2798f4fec57ce211fa15e0db2447..4025c6b5d7b45ae31c52b72be30f0e67a83b948c 100644 --- a/man/readNWISpCode.Rd +++ b/man/readNWISpCode.Rd @@ -9,7 +9,17 @@ readNWISpCode(parameterCd) \item{parameterCd}{character of USGS parameter codes. This is usually an 5 digit number.} } \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{ Imports data from NWIS about meaured parameter based on user-supplied parameter code. diff --git a/man/readNWISqw.Rd b/man/readNWISqw.Rd index 1893caf7a14575c1cd34d3f6e447bc9241961b4c..b63ee7b7dc196bbc588bd3af5bfb05522a4e1eb5 100644 --- a/man/readNWISqw.Rd +++ b/man/readNWISqw.Rd @@ -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), 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 datetimes to UTC (properly accounting for daylight savings times based on the data's provided tz_cd column). diff --git a/man/readNWISrating.Rd b/man/readNWISrating.Rd index 6a7a9608b7e6ca2e33e60e80f163037e55ad968c..c4390e4690ecc30687862e3eedc7cea765b83c9d 100644 --- a/man/readNWISrating.Rd +++ b/man/readNWISrating.Rd @@ -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 If \code{type} is "base," then the data frame has an attribute called "RATING" 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{ Reads current rating table for an active USGS streamgage from NWISweb.