diff --git a/DESCRIPTION b/DESCRIPTION index db24faf1fa1a3e4939cb31dc191b911b55bb1139..0d43ad3392dcc7b7f06926de997be2bff60847ae 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -62,7 +62,8 @@ Depends: Imports: zoo, XML, - RCurl + RCurl, + plyr Suggests: xtable, EGRET, diff --git a/NAMESPACE b/NAMESPACE index a0effc82a4061ca822787666442b9667481b7b04..cfa3034906a489e8501b0b57268d954fae68b2f6 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -43,3 +43,4 @@ export(retrieveUnitNWISData) import(RCurl) import(XML) import(zoo) +importFrom(plyr,rbind.fill.matrix) diff --git a/R/checkStartEndDate.r b/R/checkStartEndDate.r index 2e516e0941fd5d7f87597f1a08c890b9a37dd855..28a1c52e3d42b073ba0bdc87212e5a460954189f 100644 --- a/R/checkStartEndDate.r +++ b/R/checkStartEndDate.r @@ -11,7 +11,7 @@ #' @examples #' startDate <- '1985-01-01' #' endDate <- '1990-01-01' -#' checkStartEndDate(startDate, endDate, interactive = FALSE) +#' checkStartEndDate(startDate, endDate) checkStartEndDate <- function(StartDate, EndDate,interactive=TRUE){ start <- as.Date("1850-01-01") end <- as.Date(Sys.Date()) diff --git a/R/compressData.r b/R/compressData.r index 2be5baef0fb17cfff68bbf07a9515d94608a0339..57cf0bf54095f5f65e8d10240187c60cbbaed52c 100644 --- a/R/compressData.r +++ b/R/compressData.r @@ -20,7 +20,7 @@ #' comment3 <- c("","","<") #' value3 <- c(3,4,5) #' dataInput <- data.frame(dateTime, comment1, value1, comment2, value2, comment3, value3, stringsAsFactors=FALSE) -#' compressData(dataInput, interactive=FALSE) +#' compressData(dataInput) compressData <- function(data, interactive=TRUE){ data <- as.data.frame(data, stringsAsFactors=FALSE) diff --git a/R/constructNWISURL.r b/R/constructNWISURL.r index 75f9182878d45033b5c7b6d2646773e6626b1dce..f9695c6cc5e857acc08457ed5a479df96efbec6b 100644 --- a/R/constructNWISURL.r +++ b/R/constructNWISURL.r @@ -13,7 +13,7 @@ #' @param format string, can be "tsv" or "xml", and is only applicable for daily and unit value requests. "tsv" returns results faster, but there is a possiblitiy that an incomplete file is returned without warning. XML is slower, #' but will offer a warning if the file was incomplete (for example, if there was a momentary problem with the internet connection). It is possible to safely use the "tsv" option, #' but the user must carefully check the results to see if the data returns matches what is expected. The default is therefore "xml". -#' @param interactive logical Option for interactive mode. If true, there is user interaction for error handling and data checks. +#' @param interactive logical Option for interactive mode. If TRUE, there is user interaction for error handling and data checks. #' @keywords data import USGS web service #' @return url string #' @export @@ -28,7 +28,7 @@ #' url_qw <- constructNWISURL(siteNumber,c('01075','00029','00453'),startDate,endDate,'qw') #' url_wqp <- constructNWISURL(siteNumber,c('01075','00029','00453'),startDate,endDate,'wqp') #' url_daily_tsv <- constructNWISURL(siteNumber,pCode,startDate,endDate,'dv',statCd=c("00003","00001"),format="tsv") -constructNWISURL <- function(siteNumber,parameterCd,startDate,endDate,service,statCd="00003", format="xml",interactive=FALSE){ +constructNWISURL <- function(siteNumber,parameterCd,startDate,endDate,service,statCd="00003", format="xml",interactive=TRUE){ startDate <- formatCheckDate(startDate, "StartDate", interactive=interactive) endDate <- formatCheckDate(endDate, "EndDate", interactive=interactive) diff --git a/R/formatCheckParameterCd.r b/R/formatCheckParameterCd.r index 7187c6975d21ed0b40db6103debc556c41a047ee..7a0a0a49d9f123fe44a9e6350412c9a35ae3d3b0 100644 --- a/R/formatCheckParameterCd.r +++ b/R/formatCheckParameterCd.r @@ -9,7 +9,7 @@ #' @export #' @examples #' pCode <- '01234' -#' formatCheckParameterCd(pCode, interactive = FALSE) +#' formatCheckParameterCd(pCode) formatCheckParameterCd <- function(ParameterCd, interactive=TRUE){ #checks for a 5 digit number pCodeReturn <- rep(NA,length(ParameterCd)) diff --git a/R/formatCheckSiteNumber.r b/R/formatCheckSiteNumber.r index a335797958172b117ca9bbbb1c9065d8ed787f04..4a8c9d67c3351840ca14d696de450b4ff9b92e27 100644 --- a/R/formatCheckSiteNumber.r +++ b/R/formatCheckSiteNumber.r @@ -8,7 +8,7 @@ #' @export #' @examples #' site<- '01234567' -#' formatCheckSiteNumber(site, interactive = FALSE) +#' formatCheckSiteNumber(site) formatCheckSiteNumber <- function(siteNumber, interactive=TRUE){ #checks for a 8 digit number if (nchar(siteNumber) != 8){ if (interactive){ diff --git a/R/getDVData.r b/R/getDVData.r index a3d4ae68b953dfb6570bf3123e4a11e879c4851c..b2b4254a868226bb3a887a4f708f51ae17d90f39 100644 --- a/R/getDVData.r +++ b/R/getDVData.r @@ -20,7 +20,7 @@ #' @seealso \code{\link{retrieveNWISData}}, \code{\link{populateDaily}} #' @examples #' # These examples require an internet connection to run -#' Daily <- getDVData('01594440','00060', '1985-01-01', '1985-03-31', interactive=FALSE) +#' Daily <- getDVData('01594440','00060', '1985-01-01', '1985-03-31') getDVData <- function (siteNumber,ParameterCd,StartDate,EndDate,interactive=TRUE,convert=TRUE,format="tsv"){ data <- retrieveNWISData(siteNumber,ParameterCd,StartDate,EndDate,interactive=interactive,format=format) diff --git a/R/getDataAvailability.r b/R/getDataAvailability.r index 526b6a5287389a366cf919a88c4a0944500b6880..18fae0ccc32a8b513a1a528040a9a5d890ff502e 100644 --- a/R/getDataAvailability.r +++ b/R/getDataAvailability.r @@ -9,7 +9,7 @@ #' @export #' @examples #' # These examples require an internet connection to run -#' availableData <- getDataAvailability('05114000',interactive=FALSE) +#' availableData <- getDataAvailability('05114000') getDataAvailability <- function(siteNumber="",interactive=TRUE){ # Checking for 8 digit site ID: diff --git a/R/getDataFromFile.r b/R/getDataFromFile.r index 07476c04ff0d1b4c07d4319b199bd9a5abcc5dc9..edc87ab6a02f2ce7e015828cdf0e64cb88f6efaf 100644 --- a/R/getDataFromFile.r +++ b/R/getDataFromFile.r @@ -14,9 +14,9 @@ #' @examples #' # Examples of how to use getDataFromFile: #' # Change the file path and file name to something meaningful: -#' #filePath <- '~/RData/' # Sample format +#' filePath <- '~/RData/' # Sample format #' fileName <- 'ChoptankRiverFlow.txt' -#' #getDataFromFile(filePath,fileName, separator="\t") +#' \dontrun{getDataFromFile(filePath,fileName, separator="\t")} getDataFromFile <- function (filePath,fileName,hasHeader=TRUE,separator=","){ totalPath <- paste(filePath,fileName,sep=""); tmp <- read.delim( diff --git a/R/getMetaData.r b/R/getMetaData.r index f18f4fc2f145b77565a8c3c26a81c4609df7220d..e012b8978edaaa69f1cd66ad13d2c39c99b510db 100644 --- a/R/getMetaData.r +++ b/R/getMetaData.r @@ -17,7 +17,7 @@ #' @examples #' # These examples require an internet connection to run #' # Automatically gets information about site 05114000 and temperature, no interaction with user -#' INFO <- getMetaData('05114000','00010',interactive=FALSE) +#' INFO <- getMetaData('05114000','00010') getMetaData <- function(siteNumber="", parameterCd="",interactive=TRUE){ if (nzchar(siteNumber)){ INFO <- getSiteFileData(siteNumber,interactive=interactive) diff --git a/R/getQWData.r b/R/getQWData.r index 8d452b3e947aa128a9c50d436710b2c834d82449..28903c4bdd66f26ea5690dab94983af96a20fcf2 100644 --- a/R/getQWData.r +++ b/R/getQWData.r @@ -17,7 +17,7 @@ #' # These examples require an internet connection to run #' rawProcessedSample <- getQWData('01594440','01075', '1985-01-01', '1985-03-31') #' rawProcessedSampleAll <- getQWData('05114000','', '1985-01-01', '1985-03-31') -#' rawProcessedSampleSelect <- getQWData('05114000','00915;00931', '1985-01-01', '1985-04-30', interactive=FALSE) +#' rawProcessedSampleSelect <- getQWData('05114000','00915;00931', '1985-01-01', '1985-04-30') getQWData <- function(siteNumber,ParameterCd,StartDate,EndDate,interactive=TRUE){ rawSample <- getRawQWData(siteNumber,ParameterCd,StartDate,EndDate,interactive) retval <- processQWData(rawSample) diff --git a/R/getQWDataFromFile.r b/R/getQWDataFromFile.r index e403cbc15c29c722ff6788347add86c08d9949de..c9a40aa22ca82649432dda3e7b4645edce41cd60 100644 --- a/R/getQWDataFromFile.r +++ b/R/getQWDataFromFile.r @@ -17,7 +17,7 @@ #' # Change the file path and file name to something meaningful: #' filePath <- '~/RData/' # Sample format #' fileName <- 'ChoptankRiverNitrate.csv' -#' #rawSampleData <- getQWDataFromFile(filePath,fileName, separator=";") +#' \dontrun{rawSampleData <- getQWDataFromFile(filePath,fileName, separator=";")} getQWDataFromFile <- function (filePath,fileName,hasHeader=TRUE,separator=","){ totalPath <- paste(filePath,fileName,sep=""); tmp <- read.delim( diff --git a/R/getRawQWData.r b/R/getRawQWData.r index ec24d52a82901ec7059cb8fc330a362dfa73a220..b0e3b9cad17138a2998cc4d68a6a33855fd451df 100644 --- a/R/getRawQWData.r +++ b/R/getRawQWData.r @@ -5,7 +5,7 @@ #' A list of statistic codes can be found here: \url{http://nwis.waterdata.usgs.gov/nwis/help/?read_file=stat&format=table} #' #' @param siteNumber string USGS site number. This is usually an 8 digit number -#' @param ParameterCd string USGS parameter code. This is usually an 5 digit number. Multiple parameter codes can be inputted with a ';' separator. Leaving this blank will return all of the measured values during the specified time period. +#' @param ParameterCd vector of USGS 5-digit parameter code. Leaving this blank will return all of the measured values during the specified time period. #' @param StartDate string starting date for data retrieval in the form YYYY-MM-DD. #' @param EndDate string ending date for data retrieval in the form YYYY-MM-DD. #' @param interactive logical Option for interactive mode. If true, there is user interaction for error handling and data checks. @@ -18,7 +18,7 @@ #' # These examples require an internet connection to run #' rawSample <- getRawQWData('01594440','01075', '1985-01-01', '1985-03-31') #' rawSampleAll <- getRawQWData('05114000','', '1985-01-01', '1985-03-31') -#' rawSampleSelect <- getRawQWData('05114000',c('00915','00931'), '1985-01-01', '1985-04-30', interactive=FALSE) +#' rawSampleSelect <- getRawQWData('05114000',c('00915','00931'), '1985-01-01', '1985-04-30') getRawQWData <- function(siteNumber,ParameterCd,StartDate,EndDate,interactive=TRUE){ url <- constructNWISURL(siteNumber,ParameterCd,StartDate,EndDate,"wqp") diff --git a/R/getSTORETSampleData.R b/R/getSTORETSampleData.R index 79abd67a10a5bf0a31f6adb1a9cc6d11cbd4bf66..0029d140391939a768e0cc7296636fdb2df764de 100644 --- a/R/getSTORETSampleData.R +++ b/R/getSTORETSampleData.R @@ -17,8 +17,8 @@ #' @seealso \code{\link{compressData}}, \code{\link{populateSampleColumns}} #' @examples #' # These examples require an internet connection to run -#' Sample_01075 <- getSTORETSampleData('USGS-01594440','Chloride', '', '', interactive=FALSE) -#' Sample_All <- getSTORETSampleData('WIDNR_WQX-10032762','Specific conductance', '', '', interactive=FALSE) +#' Sample_01075 <- getSTORETSampleData('USGS-01594440','Chloride', '', '') +#' Sample_All <- getSTORETSampleData('WIDNR_WQX-10032762','Specific conductance', '', '') getSTORETSampleData <- function(siteNumber,characteristicName,StartDate,EndDate,interactive=TRUE){ data <- getWQPData(siteNumber,characteristicName,StartDate,EndDate,interactive=interactive) compressedData <- compressData(data, interactive=interactive) diff --git a/R/getSampleData.r b/R/getSampleData.r index 3cd6d070d3349a221ac1d8a4a4ad9790276b41e3..ae766ec1c72c9252099555d82295da7eb06680f4 100644 --- a/R/getSampleData.r +++ b/R/getSampleData.r @@ -17,9 +17,9 @@ #' @seealso \code{\link{compressData}}, \code{\link{populateSampleColumns}} #' @examples #' # These examples require an internet connection to run -#' Sample_01075 <- getSampleData('01594440','01075', '1985-01-01', '1985-03-31', interactive=FALSE) -#' Sample_All <- getSampleData('05114000','00915;00931', '1985-01-01', '1985-03-31', interactive=FALSE) -#' Sample_Select <- getSampleData('05114000','00915;00931', '', '', interactive=FALSE) +#' Sample_01075 <- getSampleData('01594440','01075', '1985-01-01', '1985-03-31') +#' Sample_All <- getSampleData('05114000','00915;00931', '1985-01-01', '1985-03-31') +#' Sample_Select <- getSampleData('05114000','00915;00931', '', '') getSampleData <- function(siteNumber,ParameterCd,StartDate,EndDate,interactive=TRUE){ data <- getQWData(siteNumber,ParameterCd,StartDate,EndDate,interactive=interactive) compressedData <- compressData(data, interactive=interactive) diff --git a/R/getSampleDataFromFile.r b/R/getSampleDataFromFile.r index f49ce7aab05c859fa6f17257bb9819cd85fa3b73..9cb560a10e987e6b0e017913ca288448cf1e4cd6 100644 --- a/R/getSampleDataFromFile.r +++ b/R/getSampleDataFromFile.r @@ -16,7 +16,7 @@ #' # Change the file path and file name to something meaningful: #' filePath <- '~/RData/' # Sample format #' fileName <- 'ChoptankRiverNitrate.csv' -#' #Sample <- getSampleDataFromFile(filePath,fileName, separator=";",interactive=FALSE) +#' \dontrun{Sample <- getSampleDataFromFile(filePath,fileName, separator=";",interactive=FALSE)} getSampleDataFromFile <- function (filePath,fileName,hasHeader=TRUE,separator=",", interactive=TRUE){ data <- getQWDataFromFile(filePath,fileName,hasHeader=hasHeader,separator=separator) compressedData <- compressData(data, interactive=interactive) diff --git a/R/getSiteFileData.r b/R/getSiteFileData.r index d4f67190d19d334f45b219489506e6c7164eb77c..46cf018792e9aa2493f464724d20e00803f71679 100644 --- a/R/getSiteFileData.r +++ b/R/getSiteFileData.r @@ -9,7 +9,7 @@ #' @export #' @examples #' # These examples require an internet connection to run -#' siteINFO <- getSiteFileData('05114000',interactive=FALSE) +#' siteINFO <- getSiteFileData('05114000') getSiteFileData <- function(siteNumber="",interactive=TRUE){ # Checking for 8 digit site ID: diff --git a/R/getWaterML1Data.r b/R/getWaterML1Data.r index fabca89165fe31d0ac886e04abfc0b21e0efffe0..a1c485cf2ae8d5aac4243302d8a4a0d20c8c3269 100644 --- a/R/getWaterML1Data.r +++ b/R/getWaterML1Data.r @@ -1,4 +1,4 @@ -#' Function to return data from the NWISWeb WaterML1.1 daily values service +#' Function to return data from the NWISWeb WaterML1.1 service #' #' This function accepts a url parameter that already contains the desired #' NWIS site, parameter code, statistic, startdate and enddate. diff --git a/R/getWaterML2Data.r b/R/getWaterML2Data.r index 4baac2f8e055364f8d675dae8c0c703538fb6cde..60d4c8fad23ce67a92545dfc4789426d083b9770 100644 --- a/R/getWaterML2Data.r +++ b/R/getWaterML2Data.r @@ -6,14 +6,10 @@ #' @return mergedDF a data frame containing columns agency, site, dateTime, values, and remark codes for all requested combinations #' @export #' @import XML -#' @import plyr +#' @importFrom plyr rbind.fill.matrix #' @examples -#' url <- "http://webvastage6.er.usgs.gov/ogc-swie/wml2/uv/sos?request=GetObservation&featureID=01446500&observedProperty=00065&offering=UNIT&beginPosition=2013-08-20" -#' dataReturned <- getWaterML2Data(url) -#' URL2 <- "http://cida-test.er.usgs.gov/ngwmn_cache/sos?REQUEST=GetObservation&featureOfInterest=VW_GWDP_GEOSERVER.USGS.401532085085301" -#' dataReturned2 <- getWaterML2Data(URL2) -#' URL3 <- "http://webvastage6.er.usgs.gov/ogc-swie/wml2/dv/sos?request=GetObservation&featureID=435601087432701&observedProperty=00045&beginPosition=2012-01-01&offering=Sum" -#' dataReturned3 <- getWaterML2Data(URL3) +#' URL <- "http://webvastage6.er.usgs.gov/ogc-swie/wml2/dv/sos?request=GetObservation&featureID=435601087432701&observedProperty=00045&beginPosition=2012-01-01&offering=Sum" +#' dataReturned3 <- getWaterML2Data(URL) getWaterML2Data <- function(obs_url){ doc <- xmlTreeParse(obs_url, getDTD = FALSE, useInternalNodes = TRUE) @@ -27,7 +23,7 @@ getWaterML2Data <- function(obs_url){ setNames(ifelse(nzchar(xmlValue(x)), xmlValue(x), ifelse("qualifier" == xmlName(x),xpathSApply(x,"./@xlink:title",namespaces = ns),"")), #originally I had the "" as xmlAttr(x) xmlName(x)), namespaces = ns) - library(plyr) + DF2 <- do.call(rbind.fill.matrix, lapply(xp, t)) DF2 <- as.data.frame(DF2,stringsAsFactors=FALSE) DF2$time <- gsub(":","",DF2$time) diff --git a/R/mergeReport.r b/R/mergeReport.r index 7db0ebd09062b2018b527cda7fb28ec31e8610b1..0cf0af3e159ba82b2684eff3c5171bce6d4faa40 100644 --- a/R/mergeReport.r +++ b/R/mergeReport.r @@ -11,9 +11,9 @@ #' @seealso \code{\link{getDVData}}, \code{\link{populateSampleColumns}} #' @examples #' # These examples require an internet connection to run -#' Daily <- getDVData('01594440','00060', '1985-01-01', '1985-03-31', interactive=FALSE) -#' Sample <- getSampleData('01594440','01075', '1985-01-01', '1985-03-31', interactive=FALSE) -#' Sample <- mergeReport(interactive=FALSE) +#' Daily <- getDVData('01594440','00060', '1985-01-01', '1985-03-31') +#' Sample <- getSampleData('01594440','01075', '1985-01-01', '1985-03-31') +#' Sample <- mergeReport() mergeReport<-function(localDaily = Daily, localSample = Sample, interactive=TRUE){ if (interactive){ dataOverview(localDaily, localSample) diff --git a/R/populateDaily.r b/R/populateDaily.r index f17163514553287ac67268175e60232c695b09da..9a3d4fff015081f450dc8726a9c67048649434f6 100644 --- a/R/populateDaily.r +++ b/R/populateDaily.r @@ -16,7 +16,7 @@ #' value <- c(1,2,3) #' code <- c("","","") #' dataInput <- data.frame(dateTime, value, code, stringsAsFactors=FALSE) -#' Daily <- populateDaily(dataInput, 2, interactive=FALSE) +#' Daily <- populateDaily(dataInput, 2) populateDaily <- function(rawData,qConvert,interactive=TRUE){ # rawData is a dataframe with at least dateTime, value, code # require(zoo) @@ -55,12 +55,12 @@ populateDaily <- function(rawData,qConvert,interactive=TRUE){ # rawData is a da zeroNums <- length(which(localDaily$Q == 0)) if (negNums > 0) { - cat("There were ", as.character(negNums), " negative flow days \n") + cat("There were", as.character(negNums), "negative flow days \n") cat("Negative values are not supported in the EGRET package\n") } if (zeroNums > 0){ - cat("There were ", as.character(zeroNums), " zero flow days \n") + cat("There were", as.character(zeroNums), "zero flow days \n") } cat("All days had",as.character(qshift),"cms added to the discharge value.\n") @@ -90,7 +90,7 @@ populateDaily <- function(rawData,qConvert,interactive=TRUE){ # rawData is a da dataPoints <- nrow(localDaily) difference <- (localDaily$Julian[dataPoints] - localDaily$Julian[1])+1 if (interactive){ - cat("There are ", as.character(dataPoints), "data points, and ", as.character(difference), "days.\n") + cat("There are", as.character(dataPoints), "data points, and", as.character(difference), "days.\n") #these next two lines show the user where the gaps in the data are if there are any n<-nrow(localDaily) diff --git a/R/populateParameterINFO.r b/R/populateParameterINFO.r index 75c04c70d64aa913db1ac42184896cae52cacbca..8ef770d6eafff951cdb3a0c6e64200bc95abd699 100644 --- a/R/populateParameterINFO.r +++ b/R/populateParameterINFO.r @@ -16,7 +16,7 @@ #' INFO$param.units <- parameterData$parameter_units #' INFO$paramShortName <- parameterData$srsname #' INFO$paramNumber <- parameterData$parameter_cd -#' INFO <- populateParameterINFO(parameterCd,interactive=FALSE) +#' INFO <- populateParameterINFO(parameterCd) populateParameterINFO <- function(parameterCd, localINFO=INFO, interactive=TRUE){ if (nzchar(parameterCd)){ if(interactive){ diff --git a/R/populateSiteINFO.r b/R/populateSiteINFO.r index 52c4f744756e37978556fae37be2ee9a79b4b8bd..49f8f0e2fb17e306971b452319f004dd8c99f6be 100644 --- a/R/populateSiteINFO.r +++ b/R/populateSiteINFO.r @@ -11,7 +11,7 @@ #' #This example requires an internet connection to run #' INFO <- getSiteFileData('01594440') #' siteNumber <- "01594440" -#' siteINFO <- populateSiteINFO(INFO, siteNumber,interactive=FALSE) +#' siteINFO <- populateSiteINFO(INFO, siteNumber) populateSiteINFO <- function(INFO, siteNumber,interactive=TRUE){ if (nzchar(siteNumber)){ diff --git a/R/renameColumns.R b/R/renameColumns.R index 27f98997080e9465bbfcfc6e348af9b14ba09a69..bf5c68dba4b7a97b3ea8f0168d7a396a75a24b7d 100644 --- a/R/renameColumns.R +++ b/R/renameColumns.R @@ -7,20 +7,9 @@ #' @return rawData dataframe with improved column names #' @export #' @examples -#' # These examples require an internet connection to run -#' siteNumber <- '05114000' -#' ParameterCd <- c('00060','00065') -#' StartDate <- as.character(Sys.Date()) -#' EndDate <- as.character(Sys.Date()) -#' # These examples require an internet connection to run -#' rawData <- retrieveUnitNWISData(siteNumber,ParameterCd,StartDate,EndDate,interactive=FALSE) -#' rawData <- renameColumns(rawData) -#' rawData2 <- retrieveNWISData(siteNumber,c("00010","00060","00300"),"2001-01-01","2002-01-01",StatCd=c("00001","00003"),interactive=FALSE) +#' # This example requires an internet connection to run +#' rawData2 <- retrieveNWISData(siteNumber,c("00010","00060","00300"),"2001-01-01","2002-01-01",StatCd=c("00001","00003")) #' rawData2 <- renameColumns(rawData2) -#' site <- '04027000' -#' pCodes <- c("00010","00060","00095","00300","00400","63680") -#' rawData3 <- retrieveUnitNWISData(site,pCodes,StartDate,EndDate,interactive=FALSE) -#' rawData3 <- renameColumns(rawData3) renameColumns <- function(rawData){ columnNames <- names(rawData) @@ -62,6 +51,10 @@ renameColumns <- function(rawData){ dataColCDS <- paste(dataColNames, "_cd") columnNames[which(columnNames %in% dataCol_names)] <- dataColNames columnNames[which(columnNames %in% dataCol_cds)] <- dataColCDS + + columnNames <- gsub("[$,. ]","_",columnNames) + columnNames <- gsub("__","_",columnNames) + names(rawData) <- columnNames return(rawData) diff --git a/R/retrieveNWISData.r b/R/retrieveNWISData.r index ca901e99af4ec228cb0a4ea3bc5b1e152f2946e2..4d8399fab2c67618111ce574b2373096af2ee74a 100644 --- a/R/retrieveNWISData.r +++ b/R/retrieveNWISData.r @@ -23,9 +23,9 @@ #' endDate <- '2012-06-30' #' pCode <- "00060" #' rawDailyQ <- retrieveNWISData(siteNumber,pCode, startDate, endDate) -#' rawDailyTemperature <- retrieveNWISData(siteNumber,'00010', startDate, endDate, StatCd='00001',interactive=FALSE) -#' rawDailyTemperatureTSV <- retrieveNWISData(siteNumber,'00010', startDate, endDate, StatCd='00001',format="tsv",interactive=FALSE) -#' rawDailyQAndTempMeanMax <- retrieveNWISData(siteNumber,c('00010','00060'), startDate, endDate, StatCd=c('00001','00003'), interactive=FALSE) +#' rawDailyTemperature <- retrieveNWISData(siteNumber,'00010', startDate, endDate, StatCd='00001') +#' rawDailyTemperatureTSV <- retrieveNWISData(siteNumber,'00010', startDate, endDate, StatCd='00001',format="tsv") +#' rawDailyQAndTempMeanMax <- retrieveNWISData(siteNumber,c('00010','00060'), startDate, endDate, StatCd=c('00001','00003')) retrieveNWISData <- function (siteNumber,ParameterCd,StartDate,EndDate,StatCd="00003",format="tsv",interactive=TRUE){ url <- constructNWISURL(siteNumber,ParameterCd,StartDate,EndDate,"dv",statCd=StatCd,format=format) diff --git a/R/retrieveNWISqwData.r b/R/retrieveNWISqwData.r index 7b7010a9e5beb68df852db61bffbdc782e7df420..1e6b7ab5e938050cd30533ee1a0c6cd04c5a1dc0 100644 --- a/R/retrieveNWISqwData.r +++ b/R/retrieveNWISqwData.r @@ -21,7 +21,7 @@ #' # To get data in Sample dataframe format: #' data <- rawNWISqwData[,names(rawNWISqwData) != "site"] #' data$dateTime <- as.Date(data$dateTime) -#' compressedData <- compressData(data, interactive=interactive) +#' compressedData <- compressData(data) #' Sample <- populateSampleColumns(compressedData) retrieveNWISqwData <- function (siteNumber,pCodes,startDate,endDate){ diff --git a/R/retrieveUnitNWISData.r b/R/retrieveUnitNWISData.r index b40b98af8782385be37af169c21dd4e1117cbae4..f2130d26909c1868510f2755ba29447325249673 100644 --- a/R/retrieveUnitNWISData.r +++ b/R/retrieveUnitNWISData.r @@ -21,8 +21,8 @@ #' StartDate <- as.character(Sys.Date()) #' EndDate <- as.character(Sys.Date()) #' # These examples require an internet connection to run -#' rawData <- retrieveUnitNWISData(siteNumber,ParameterCd,StartDate,EndDate,interactive=FALSE) -#' rawData2 <- retrieveUnitNWISData(siteNumber,ParameterCd,StartDate,EndDate,"tsv",interactive=FALSE) +#' rawData <- retrieveUnitNWISData(siteNumber,ParameterCd,StartDate,EndDate) +#' rawData2 <- retrieveUnitNWISData(siteNumber,ParameterCd,StartDate,EndDate,"tsv") retrieveUnitNWISData <- function (siteNumber,ParameterCd,StartDate,EndDate,format="xml",interactive=TRUE){ url <- constructNWISURL(siteNumber,ParameterCd,StartDate,EndDate,"uv",format=format) diff --git a/inst/doc/dataRetrieval.pdf b/inst/doc/dataRetrieval.pdf index 9c3efd6b32f4a2d216c164cb05d1d4fe3a4e04f8..1def98857083c27b2beccf76cabc2af7c6078832 100644 Binary files a/inst/doc/dataRetrieval.pdf and b/inst/doc/dataRetrieval.pdf differ diff --git a/man/checkStartEndDate.Rd b/man/checkStartEndDate.Rd index 892f64cca9c0ad84ad4ad691484ae396ed210d2e..ce5da41b9ff354cc6a75844912f837221ac37adb 100644 --- a/man/checkStartEndDate.Rd +++ b/man/checkStartEndDate.Rd @@ -24,7 +24,7 @@ \examples{ startDate <- '1985-01-01' endDate <- '1990-01-01' -checkStartEndDate(startDate, endDate, interactive = FALSE) +checkStartEndDate(startDate, endDate) } \keyword{WRTDS} \keyword{flow} diff --git a/man/compressData.Rd b/man/compressData.Rd index 92d9134d44d9369c41a427c163d614c96601a8d5..143dbcc72c6db7959e9542ad30dd7800b2b225ab 100644 --- a/man/compressData.Rd +++ b/man/compressData.Rd @@ -34,7 +34,7 @@ value2 <- c(2,3,4) comment3 <- c("","","<") value3 <- c(3,4,5) dataInput <- data.frame(dateTime, comment1, value1, comment2, value2, comment3, value3, stringsAsFactors=FALSE) -compressData(dataInput, interactive=FALSE) +compressData(dataInput) } \keyword{WRTDS} \keyword{flow} diff --git a/man/constructNWISURL.Rd b/man/constructNWISURL.Rd index d27f4d78cc64771dabe636f541ce83bf84e2d358..69e70cecc0627af3f24b0a861b11b7e1e4c33264 100644 --- a/man/constructNWISURL.Rd +++ b/man/constructNWISURL.Rd @@ -4,7 +4,7 @@ \usage{ constructNWISURL(siteNumber, parameterCd, startDate, endDate, service, statCd = "00003", format = "xml", - interactive = FALSE) + interactive = TRUE) } \arguments{ \item{siteNumber}{string or vector of strings USGS site @@ -40,7 +40,7 @@ expected. The default is therefore "xml".} \item{interactive}{logical Option for interactive mode. - If true, there is user interaction for error handling and + If TRUE, there is user interaction for error handling and data checks.} } \value{ diff --git a/man/formatCheckParameterCd.Rd b/man/formatCheckParameterCd.Rd index d1574546ed4940e46494b4c4bbd46bacce0da90e..a506bd85e0ba4eda3d47c926635ed44c98a33fb8 100644 --- a/man/formatCheckParameterCd.Rd +++ b/man/formatCheckParameterCd.Rd @@ -21,7 +21,7 @@ } \examples{ pCode <- '01234' -formatCheckParameterCd(pCode, interactive = FALSE) +formatCheckParameterCd(pCode) } \keyword{WRTDS} \keyword{flow} diff --git a/man/formatCheckSiteNumber.Rd b/man/formatCheckSiteNumber.Rd index 5d8b42cd9e9cb3a8d96bdf4d70ac01ec0fbe8a03..2f16232501e4729fb68393c7cbb60ff70116ad3b 100644 --- a/man/formatCheckSiteNumber.Rd +++ b/man/formatCheckSiteNumber.Rd @@ -20,7 +20,7 @@ } \examples{ site<- '01234567' -formatCheckSiteNumber(site, interactive = FALSE) +formatCheckSiteNumber(site) } \keyword{WRTDS} \keyword{flow} diff --git a/man/getDVData.Rd b/man/getDVData.Rd index 89c721c68e85843950c7fb0fe53685004d4a2264..e4a61195d1b730cc87bb7d713dcf80d013e08b3d 100644 --- a/man/getDVData.Rd +++ b/man/getDVData.Rd @@ -51,7 +51,7 @@ } \examples{ # These examples require an internet connection to run -Daily <- getDVData('01594440','00060', '1985-01-01', '1985-03-31', interactive=FALSE) +Daily <- getDVData('01594440','00060', '1985-01-01', '1985-03-31') } \seealso{ \code{\link{retrieveNWISData}}, diff --git a/man/getDataAvailability.Rd b/man/getDataAvailability.Rd index 97d8982836502c506edd289ce9441bce879eb365..4c45fe760d625a04f65b4243a4bca5882f5abd91 100644 --- a/man/getDataAvailability.Rd +++ b/man/getDataAvailability.Rd @@ -23,7 +23,7 @@ } \examples{ # These examples require an internet connection to run -availableData <- getDataAvailability('05114000',interactive=FALSE) +availableData <- getDataAvailability('05114000') } \keyword{USGS} \keyword{data} diff --git a/man/getDataFromFile.Rd b/man/getDataFromFile.Rd index 6d772bcf24750ac0310a71fe9293e8cf4287bea0..7ec446f59216b6173dead3192e11d6cd46fb0a08 100644 --- a/man/getDataFromFile.Rd +++ b/man/getDataFromFile.Rd @@ -29,9 +29,9 @@ \examples{ # Examples of how to use getDataFromFile: # Change the file path and file name to something meaningful: -#filePath <- '~/RData/' # Sample format +filePath <- '~/RData/' # Sample format fileName <- 'ChoptankRiverFlow.txt' -#getDataFromFile(filePath,fileName, separator="\\t") +\dontrun{getDataFromFile(filePath,fileName, separator="\\t")} } \keyword{data} \keyword{file} diff --git a/man/getMetaData.Rd b/man/getMetaData.Rd index fb57f7d818c177f9756645238dada84569867e04..91ae02d37af2334be85e06624148abed504efe14 100644 --- a/man/getMetaData.Rd +++ b/man/getMetaData.Rd @@ -37,7 +37,7 @@ \examples{ # These examples require an internet connection to run # Automatically gets information about site 05114000 and temperature, no interaction with user -INFO <- getMetaData('05114000','00010',interactive=FALSE) +INFO <- getMetaData('05114000','00010') } \keyword{USGS} \keyword{WRTDS} diff --git a/man/getQWData.Rd b/man/getQWData.Rd index 8348de8d5e2cd018928e1498e8d0ce37842488d7..70f7885ccba58ef2dd0f5a29dcd5e4d5f2481bbf 100644 --- a/man/getQWData.Rd +++ b/man/getQWData.Rd @@ -44,7 +44,7 @@ # These examples require an internet connection to run rawProcessedSample <- getQWData('01594440','01075', '1985-01-01', '1985-03-31') rawProcessedSampleAll <- getQWData('05114000','', '1985-01-01', '1985-03-31') -rawProcessedSampleSelect <- getQWData('05114000','00915;00931', '1985-01-01', '1985-04-30', interactive=FALSE) +rawProcessedSampleSelect <- getQWData('05114000','00915;00931', '1985-01-01', '1985-04-30') } \keyword{USGS} \keyword{data} diff --git a/man/getQWDataFromFile.Rd b/man/getQWDataFromFile.Rd index c25fa7a47ff0d1c6805bb7beaaf381de7a0a152a..1303449e53bd8b0d45a379c661ae17f392bf6d38 100644 --- a/man/getQWDataFromFile.Rd +++ b/man/getQWDataFromFile.Rd @@ -33,7 +33,7 @@ # Change the file path and file name to something meaningful: filePath <- '~/RData/' # Sample format fileName <- 'ChoptankRiverNitrate.csv' -#rawSampleData <- getQWDataFromFile(filePath,fileName, separator=";") +\dontrun{rawSampleData <- getQWDataFromFile(filePath,fileName, separator=";")} } \keyword{data} \keyword{file} diff --git a/man/getRawQWData.Rd b/man/getRawQWData.Rd index 738023e62faec1f5e19e3f7973eb04b875e5d7d0..b1aaccf3f4ba98c5ba10aa23757614e4391ceb92 100644 --- a/man/getRawQWData.Rd +++ b/man/getRawQWData.Rd @@ -9,11 +9,9 @@ \item{siteNumber}{string USGS site number. This is usually an 8 digit number} - \item{ParameterCd}{string USGS parameter code. This is - usually an 5 digit number. Multiple parameter codes can - be inputted with a ';' separator. Leaving this blank - will return all of the measured values during the - specified time period.} + \item{ParameterCd}{vector of USGS 5-digit parameter code. + Leaving this blank will return all of the measured values + during the specified time period.} \item{StartDate}{string starting date for data retrieval in the form YYYY-MM-DD.} @@ -43,7 +41,7 @@ # These examples require an internet connection to run rawSample <- getRawQWData('01594440','01075', '1985-01-01', '1985-03-31') rawSampleAll <- getRawQWData('05114000','', '1985-01-01', '1985-03-31') -rawSampleSelect <- getRawQWData('05114000',c('00915','00931'), '1985-01-01', '1985-04-30', interactive=FALSE) +rawSampleSelect <- getRawQWData('05114000',c('00915','00931'), '1985-01-01', '1985-04-30') } \keyword{USGS} \keyword{data} diff --git a/man/getSTORETSampleData.Rd b/man/getSTORETSampleData.Rd index a1fc936e537dcb5235c44d9582da57eb0dad1fa3..5fe9a4d79738ad6db7a43422ef8e43a398527567 100644 --- a/man/getSTORETSampleData.Rd +++ b/man/getSTORETSampleData.Rd @@ -37,8 +37,8 @@ } \examples{ # These examples require an internet connection to run -Sample_01075 <- getSTORETSampleData('USGS-01594440','Chloride', '', '', interactive=FALSE) -Sample_All <- getSTORETSampleData('WIDNR_WQX-10032762','Specific conductance', '', '', interactive=FALSE) +Sample_01075 <- getSTORETSampleData('USGS-01594440','Chloride', '', '') +Sample_All <- getSTORETSampleData('WIDNR_WQX-10032762','Specific conductance', '', '') } \seealso{ \code{\link{compressData}}, diff --git a/man/getSampleData.Rd b/man/getSampleData.Rd index f8fc6db8dd5b2a7f164977fe2e1c287b8eefcb84..aa83390b01f2f112a4441e86fe4491d60803de99 100644 --- a/man/getSampleData.Rd +++ b/man/getSampleData.Rd @@ -38,9 +38,9 @@ } \examples{ # These examples require an internet connection to run -Sample_01075 <- getSampleData('01594440','01075', '1985-01-01', '1985-03-31', interactive=FALSE) -Sample_All <- getSampleData('05114000','00915;00931', '1985-01-01', '1985-03-31', interactive=FALSE) -Sample_Select <- getSampleData('05114000','00915;00931', '', '', interactive=FALSE) +Sample_01075 <- getSampleData('01594440','01075', '1985-01-01', '1985-03-31') +Sample_All <- getSampleData('05114000','00915;00931', '1985-01-01', '1985-03-31') +Sample_Select <- getSampleData('05114000','00915;00931', '', '') } \seealso{ \code{\link{compressData}}, diff --git a/man/getSampleDataFromFile.Rd b/man/getSampleDataFromFile.Rd index f295b54c36bbffe76ecd4934edde2f67b6531f51..41907f997828a77f8393939512736290ebaf77f7 100644 --- a/man/getSampleDataFromFile.Rd +++ b/man/getSampleDataFromFile.Rd @@ -33,7 +33,7 @@ # Change the file path and file name to something meaningful: filePath <- '~/RData/' # Sample format fileName <- 'ChoptankRiverNitrate.csv' -#Sample <- getSampleDataFromFile(filePath,fileName, separator=";",interactive=FALSE) +\dontrun{Sample <- getSampleDataFromFile(filePath,fileName, separator=";",interactive=FALSE)} } \keyword{USGS} \keyword{WRTDS} diff --git a/man/getSiteFileData.Rd b/man/getSiteFileData.Rd index 37a7d14a54aa31799bcb74be2ebf6e8137323eac..56f3fdff84903dc5f704b46179269f3660fb5867 100644 --- a/man/getSiteFileData.Rd +++ b/man/getSiteFileData.Rd @@ -22,7 +22,7 @@ } \examples{ # These examples require an internet connection to run -siteINFO <- getSiteFileData('05114000',interactive=FALSE) +siteINFO <- getSiteFileData('05114000') } \keyword{USGS} \keyword{data} diff --git a/man/getWaterML1Data.Rd b/man/getWaterML1Data.Rd index eb259185e93590ebfa75b838e470ccda90d010bd..5f62dc79ab951e77d2905b2a4d2f9d4de1046c8c 100644 --- a/man/getWaterML1Data.Rd +++ b/man/getWaterML1Data.Rd @@ -1,6 +1,6 @@ \name{getWaterML1Data} \alias{getWaterML1Data} -\title{Function to return data from the NWISWeb WaterML1.1 daily values service} +\title{Function to return data from the NWISWeb WaterML1.1 service} \usage{ getWaterML1Data(obs_url) } diff --git a/man/getWaterML2Data.Rd b/man/getWaterML2Data.Rd index 3e7611bd1d4516cc91bb914fb33339def82b452d..0c747e83688d3d298d09a95f8f61be2809265d1d 100644 --- a/man/getWaterML2Data.Rd +++ b/man/getWaterML2Data.Rd @@ -18,7 +18,7 @@ getObservation } \examples{ -url <- "http://webvastage6.er.usgs.gov/ogc-swie/wml2/uv/sos?request=GetObservation&featureID=01446500&observedProperty=00065&offering=UNIT&beginPosition=2013-08-20" -dataReturned <- getWaterML2Data(urlMulti) +URL <- "http://webvastage6.er.usgs.gov/ogc-swie/wml2/dv/sos?request=GetObservation&featureID=435601087432701&observedProperty=00045&beginPosition=2012-01-01&offering=Sum" +dataReturned3 <- getWaterML2Data(URL) } diff --git a/man/mergeReport.Rd b/man/mergeReport.Rd index 5efff9d3878cddc49ca7a82527a2ece4d08a4f52..f66466308fd52d95f367657fb9bddeb9162702c2 100644 --- a/man/mergeReport.Rd +++ b/man/mergeReport.Rd @@ -25,9 +25,9 @@ } \examples{ # These examples require an internet connection to run -Daily <- getDVData('01594440','00060', '1985-01-01', '1985-03-31', interactive=FALSE) -Sample <- getSampleData('01594440','01075', '1985-01-01', '1985-03-31', interactive=FALSE) -Sample <- mergeReport(interactive=FALSE) +Daily <- getDVData('01594440','00060', '1985-01-01', '1985-03-31') +Sample <- getSampleData('01594440','01075', '1985-01-01', '1985-03-31') +Sample <- mergeReport() } \seealso{ \code{\link{getDVData}}, diff --git a/man/populateDaily.Rd b/man/populateDaily.Rd index 5722f563c0cd546c3c1cb92f01026ffb4690c6a3..17b7ddd74e351dadf310ac4ee1cfb9747b4d99b8 100644 --- a/man/populateDaily.Rd +++ b/man/populateDaily.Rd @@ -28,7 +28,7 @@ dateTime <- c('1985-01-01', '1985-01-02', '1985-01-03') value <- c(1,2,3) code <- c("","","") dataInput <- data.frame(dateTime, value, code, stringsAsFactors=FALSE) -Daily <- populateDaily(dataInput, 2, interactive=FALSE) +Daily <- populateDaily(dataInput, 2) } \author{ Robert M. Hirsch \email{rhirsch@usgs.gov} diff --git a/man/populateParameterINFO.Rd b/man/populateParameterINFO.Rd index bcc0acb9ce87acb77333428a1d5dfa000a5111f8..695a65d08d98375adf4e338e4a7702e89c251143 100644 --- a/man/populateParameterINFO.Rd +++ b/man/populateParameterINFO.Rd @@ -31,6 +31,6 @@ INFO$param.nm <- parameterData$parameter_nm INFO$param.units <- parameterData$parameter_units INFO$paramShortName <- parameterData$srsname INFO$paramNumber <- parameterData$parameter_cd -INFO <- populateParameterINFO(parameterCd,interactive=FALSE) +INFO <- populateParameterINFO(parameterCd) } diff --git a/man/populateSiteINFO.Rd b/man/populateSiteINFO.Rd index 7603aa9645780c95fe4ed5b4983f8c9964f4722c..ac90811d19a6ba630d697f101d24b3bba1f015f6 100644 --- a/man/populateSiteINFO.Rd +++ b/man/populateSiteINFO.Rd @@ -25,6 +25,6 @@ #This example requires an internet connection to run INFO <- getSiteFileData('01594440') siteNumber <- "01594440" -siteINFO <- populateSiteINFO(INFO, siteNumber,interactive=FALSE) +siteINFO <- populateSiteINFO(INFO, siteNumber) } diff --git a/man/renameColumns.Rd b/man/renameColumns.Rd index 1f68f8287b74f95468fbcb9c74310e07a0d7cbb0..d1900410d08d1d33d24f8f46306a63c10d1ecf85 100644 --- a/man/renameColumns.Rd +++ b/man/renameColumns.Rd @@ -15,20 +15,9 @@ Rename columns coming back from NWIS data retrievals } \examples{ -# These examples require an internet connection to run -siteNumber <- '05114000' -ParameterCd <- c('00060','00065') -StartDate <- as.character(Sys.Date()) -EndDate <- as.character(Sys.Date()) -# These examples require an internet connection to run -rawData <- retrieveUnitNWISData(siteNumber,ParameterCd,StartDate,EndDate,interactive=FALSE) -rawData <- renameColumns(rawData) -rawData2 <- retrieveNWISData(siteNumber,c("00010","00060","00300"),"2001-01-01","2002-01-01",StatCd=c("00001","00003"),interactive=FALSE) +# This example requires an internet connection to run +rawData2 <- retrieveNWISData(siteNumber,c("00010","00060","00300"),"2001-01-01","2002-01-01",StatCd=c("00001","00003")) rawData2 <- renameColumns(rawData2) -site <- '04027000' -pCodes <- c("00010","00060","00095","00300","00400","63680") -rawData3 <- retrieveUnitNWISData(site,pCodes,StartDate,EndDate,interactive=FALSE) -rawData3 <- renameColumns(rawData3) } \keyword{USGS} \keyword{data} diff --git a/man/retrieveNWISData.Rd b/man/retrieveNWISData.Rd index 8d7ce45c0360d221dbd8763fce7246cdd8c34e95..43181ce116c3620cc2d8267233d4065e37a3e1ed 100644 --- a/man/retrieveNWISData.Rd +++ b/man/retrieveNWISData.Rd @@ -56,9 +56,9 @@ startDate <- '2012-01-01' endDate <- '2012-06-30' pCode <- "00060" rawDailyQ <- retrieveNWISData(siteNumber,pCode, startDate, endDate) -rawDailyTemperature <- retrieveNWISData(siteNumber,'00010', startDate, endDate, StatCd='00001',interactive=FALSE) -rawDailyTemperatureTSV <- retrieveNWISData(siteNumber,'00010', startDate, endDate, StatCd='00001',format="tsv",interactive=FALSE) -rawDailyQAndTempMeanMax <- retrieveNWISData(siteNumber,c('00010','00060'), startDate, endDate, StatCd=c('00001','00003'), interactive=FALSE) +rawDailyTemperature <- retrieveNWISData(siteNumber,'00010', startDate, endDate, StatCd='00001') +rawDailyTemperatureTSV <- retrieveNWISData(siteNumber,'00010', startDate, endDate, StatCd='00001',format="tsv") +rawDailyQAndTempMeanMax <- retrieveNWISData(siteNumber,c('00010','00060'), startDate, endDate, StatCd=c('00001','00003')) } \keyword{USGS} \keyword{data} diff --git a/man/retrieveNWISqwData.Rd b/man/retrieveNWISqwData.Rd index 254045c748b2520c03b207a717b6a2034639f995..48e5fd6e9cfdc928c83d4c8a0e10a7d4245d2c8c 100644 --- a/man/retrieveNWISqwData.Rd +++ b/man/retrieveNWISqwData.Rd @@ -41,7 +41,7 @@ rawNWISqwData <- retrieveNWISqwData(siteNumber,pCodes,startDate,endDate) # To get data in Sample dataframe format: data <- rawNWISqwData[,names(rawNWISqwData) != "site"] data$dateTime <- as.Date(data$dateTime) -compressedData <- compressData(data, interactive=interactive) +compressedData <- compressData(data) Sample <- populateSampleColumns(compressedData) } \keyword{USGS} diff --git a/man/retrieveUnitNWISData.Rd b/man/retrieveUnitNWISData.Rd index f69c1294191c97249a6426057aab6a3daa315659..05e4bd29288ce6e2318022fa2f8bba1d78be1f2a 100644 --- a/man/retrieveUnitNWISData.Rd +++ b/man/retrieveUnitNWISData.Rd @@ -51,8 +51,8 @@ ParameterCd <- '00060' StartDate <- as.character(Sys.Date()) EndDate <- as.character(Sys.Date()) # These examples require an internet connection to run -rawData <- retrieveUnitNWISData(siteNumber,ParameterCd,StartDate,EndDate,interactive=FALSE) -rawData2 <- retrieveUnitNWISData(siteNumber,ParameterCd,StartDate,EndDate,"tsv",interactive=FALSE) +rawData <- retrieveUnitNWISData(siteNumber,ParameterCd,StartDate,EndDate) +rawData2 <- retrieveUnitNWISData(siteNumber,ParameterCd,StartDate,EndDate,"tsv") } \keyword{USGS} \keyword{data} diff --git a/vignettes/dataRetrieval-concordance.tex b/vignettes/dataRetrieval-concordance.tex index 01bedc0b2020a711a149b2b72d000e6f9e94a837..ebbc1fc7a7fb60fa965678258b10a88cda7e4020 100644 --- a/vignettes/dataRetrieval-concordance.tex +++ b/vignettes/dataRetrieval-concordance.tex @@ -1,9 +1,9 @@ \Sconcordance{concordance:dataRetrieval.tex:dataRetrieval.Rnw:% -1 49 1 55 0 1 6 11 1 1 5 41 1 10 0 16 1 9 0 21 1 5 0 % -6 1 8 0 14 1 42 0 17 1 4 0 15 1 6 0 16 1 10 0 5 1 8 0 % -20 1 5 0 16 1 4 0 21 1 10 0 20 1 5 0 4 1 18 0 29 1 9 % -0 10 1 10 0 14 1 21 0 19 1 5 0 19 1 5 0 17 1 8 0 14 1 % +1 49 1 50 0 1 6 11 1 1 5 41 1 10 0 16 1 9 0 21 1 5 0 % +6 1 8 0 14 1 42 0 17 1 3 0 15 1 6 0 16 1 10 0 5 1 8 0 % +20 1 3 0 18 1 1 0 21 1 9 0 20 1 4 0 4 1 18 0 29 1 6 0 % +10 1 10 0 14 1 21 0 19 1 5 0 19 1 5 0 17 1 8 0 14 1 % 15 0 16 1 5 0 9 1 5 0 62 1 6 0 14 1 17 0 36 1 5 0 24 % -1 5 0 20 1 38 0 13 1 10 0 22 1 5 0 5 1 13 0 10 1 5 0 % -7 1 5 0 16 1 51 0 15 1 49 0 7 1 32 0 24 1 19 0 8 1 5 % +1 5 0 20 1 37 0 13 1 10 0 22 1 5 0 5 1 13 0 10 1 5 0 % +7 1 5 0 16 1 51 0 15 1 49 0 7 1 32 0 24 1 18 0 8 1 5 % 0 56 1} diff --git a/vignettes/dataRetrieval.Rnw b/vignettes/dataRetrieval.Rnw index 82de5232f8cb84cf72abb2dde05ba3ecbd508326..2d28f5b4c8fad9de9380de0508d59de671fe0e0b 100644 --- a/vignettes/dataRetrieval.Rnw +++ b/vignettes/dataRetrieval.Rnw @@ -256,6 +256,8 @@ endDate <- "2012-05-01" temperatureAndFlow <- retrieveNWISData(siteNumber, parameterCd, startDate, endDate, StatCd=statCd) +temperatureAndFlow <- renameColumns(temperatureAndFlow) + @ Daily data is pulled from \url{http://waterservices.usgs.gov/rest/DV-Test-Tool.html}. @@ -264,14 +266,14 @@ An example of plotting the above data (Figure \ref{fig:getNWIStemperaturePlot}): <<getNWIStemperaturePlot, echo=TRUE, fig.cap="Temperature and discharge plot of Choptank River in 2012.",out.width='1\\linewidth',out.height='1\\linewidth',fig.show='hold'>>= par(mar=c(5,5,5,5)) -colnames <- names(temperatureAndFlow) + with(temperatureAndFlow, plot( - datetime, get(colnames[6]), + datetime, Temperature_water_01, xlab="Date",ylab="Temperature [C]" )) par(new=TRUE) with(temperatureAndFlow, plot( - get(colnames[3]), get(colnames[8]), + datetime, Stream_flow_mean_daily, col="red",type="l",xaxt="n",yaxt="n",xlab="",ylab="",axes=FALSE )) axis(4,col="red",col.axis="red") diff --git a/vignettes/dataRetrieval.log b/vignettes/dataRetrieval.log index 4002811f19e51483ba099632eeb9fcadfbf46a4b..bc8b26a1d159677b0656e34aa3b7ec6eae6195f2 100644 --- a/vignettes/dataRetrieval.log +++ b/vignettes/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) 1 AUG 2013 16:23 +This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9) (preloaded format=pdflatex 2012.1.6) 4 SEP 2013 12:54 entering extended mode **dataRetrieval.tex (D:\LADData\RCode\dataRetrieval\vignettes\dataRetrieval.tex @@ -428,30 +428,28 @@ Package textcomp Info: Setting ptmx sub-encoding to TS1/4 on input line 339. Package textcomp Info: Setting ptmj sub-encoding to TS1/4 on input line 340. )) (D:\LADData\RCode\dataRetrieval\vignettes\dataRetrieval.aux) -LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 102. -LaTeX Font Info: ... okay on input line 102. -LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 102. -LaTeX Font Info: ... okay on input line 102. -LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 102. -LaTeX Font Info: ... okay on input line 102. -LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 102. -LaTeX Font Info: ... okay on input line 102. -LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 102. -LaTeX Font Info: ... okay on input line 102. -LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 102. -LaTeX Font Info: ... okay on input line 102. -LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 102. -LaTeX Font Info: ... okay on input line 102. -LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 102. -LaTeX Font Info: Try loading font information for TS1+cmr on input line 102. - +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 97. +LaTeX Font Info: ... okay on input line 97. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 97. +LaTeX Font Info: ... okay on input line 97. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 97. +LaTeX Font Info: ... okay on input line 97. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 97. +LaTeX Font Info: ... okay on input line 97. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 97. +LaTeX Font Info: ... okay on input line 97. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 97. +LaTeX Font Info: ... okay on input line 97. +LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 97. +LaTeX Font Info: ... okay on input line 97. +LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 97. +LaTeX Font Info: Try loading font information for TS1+cmr on input line 97. ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\ts1cmr.fd" File: ts1cmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions ) -LaTeX Font Info: ... okay on input line 102. -LaTeX Font Info: Try loading font information for OT1+ptm on input line 102. - +LaTeX Font Info: ... okay on input line 97. +LaTeX Font Info: Try loading font information for OT1+ptm on input line 97. ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\psnfss\ot1ptm.fd" File: ot1ptm.fd 2001/06/04 font definitions for OT1/ptm. @@ -471,7 +469,7 @@ File: ot1ptm.fd 2001/06/04 font definitions for OT1/ptm. \everyMPtoPDFconversion=\toks23 ) \AtBeginShipoutBox=\box30 -Package hyperref Info: Link coloring OFF on input line 102. +Package hyperref Info: Link coloring OFF on input line 97. ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\hyperref\nameref.sty" Package: nameref 2010/04/30 v2.40 Cross-referencing by name of section @@ -480,9 +478,9 @@ Package: gettitlestring 2010/12/03 v1.4 Cleanup title references (HO) ) \c@section@level=\count130 ) -LaTeX Info: Redefining \ref on input line 102. -LaTeX Info: Redefining \pageref on input line 102. -LaTeX Info: Redefining \nameref on input line 102. +LaTeX Info: Redefining \ref on input line 97. +LaTeX Info: Redefining \pageref on input line 97. +LaTeX Info: Redefining \nameref on input line 97. (D:\LADData\RCode\dataRetrieval\vignettes\dataRetrieval.out) (D:\LADData\RCode\dataRetrieval\vignettes\dataRetrieval.out) @@ -491,7 +489,7 @@ Package caption Info: Begin \AtBeginDocument code. Package caption Info: subfig package v1.3 is loaded. Package caption Info: End \AtBeginDocument code. LaTeX Font Info: Font shape `OT1/ptm/bx/n' in size <14.4> not available -(Font) Font shape `OT1/ptm/b/n' tried instead on input line 122. +(Font) Font shape `OT1/ptm/b/n' tried instead on input line 117. (D:\LADData\RCode\dataRetrieval\vignettes\dataRetrieval.toc LaTeX Font Info: Font shape `OT1/ptm/bx/n' in size <10.95> not available @@ -504,7 +502,7 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] {C:/Users/ldecicco/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]) \tf@toc=\write4 -LaTeX Font Info: Try loading font information for OT1+pcr on input line 127. +LaTeX Font Info: Try loading font information for OT1+pcr on input line 122. ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\psnfss\ot1pcr.fd" @@ -515,9 +513,9 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [2] LaTeX Font Info: Font shape `OT1/ptm/bx/n' in size <12> not available -(Font) Font shape `OT1/ptm/b/n' tried instead on input line 141. +(Font) Font shape `OT1/ptm/b/n' tried instead on input line 136. -Overfull \hbox (22.25568pt too wide) in paragraph at lines 173--174 +Overfull \hbox (22.25568pt too wide) in paragraph at lines 168--169 [][]$\OT1/pcr/m/n/10.95 http : / / nwis . waterdata . usgs . gov / nwis / help / ?read _ file = stat&format = table$[] [] @@ -527,55 +525,57 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [3] -Package color Info: Redefining color shadecolor on input line 211. +Package color Info: Redefining color shadecolor on input line 206. LaTeX Font Info: Font shape `OT1/pcr/bx/n' in size <10.95> not available -(Font) Font shape `OT1/pcr/b/n' tried instead on input line 213. -Package color Info: Redefining color shadecolor on input line 225. +(Font) Font shape `OT1/pcr/b/n' tried instead on input line 208. +LaTeX Font Info: Font shape `OT1/pcr/m/it' in size <10.95> not available +(Font) Font shape `OT1/pcr/m/sl' tried instead on input line 209. +Package color Info: Redefining color shadecolor on input line 220. -Overfull \hbox (43.87282pt too wide) in paragraph at lines 235--236 +Overfull \hbox (43.87282pt too wide) in paragraph at lines 230--231 []\OT1/ptm/m/n/10.95 Site in-for-ma-tion is ob-tained from []$\OT1/pcr/m/n/10.9 5 http : / / waterservices . usgs . gov / rest / Site-[]Test-[]Tool .$ [] -Package color Info: Redefining color shadecolor on input line 245. +Package color Info: Redefining color shadecolor on input line 240. -Overfull \hbox (57.81561pt too wide) in paragraph at lines 287--287 +Overfull \hbox (57.81561pt too wide) in paragraph at lines 282--282 [] \OT1/pcr/m/n /10.95 parameter_nm[] [] -Overfull \hbox (57.81561pt too wide) in paragraph at lines 287--287 +Overfull \hbox (57.81561pt too wide) in paragraph at lines 282--282 []\OT1/pcr/m/n/10.95 1 Location in cross section, distance from right bank loo king upstream, feet[] [] -Overfull \hbox (57.81561pt too wide) in paragraph at lines 287--287 +Overfull \hbox (57.81561pt too wide) in paragraph at lines 282--282 []\OT1/pcr/m/n/10.95 2 Stream width, feet[] [] -Overfull \hbox (57.81561pt too wide) in paragraph at lines 287--287 +Overfull \hbox (57.81561pt too wide) in paragraph at lines 282--282 []\OT1/pcr/m/n/10.95 3 Sampl e accounting number[] [] -Overfull \hbox (57.81561pt too wide) in paragraph at lines 287--287 +Overfull \hbox (57.81561pt too wide) in paragraph at lines 282--282 []\OT1/pcr/m/n/10.95 4 Location in cross section, distance from left bank looki ng downstream, feet[] [] -Overfull \hbox (57.81561pt too wide) in paragraph at lines 287--287 +Overfull \hbox (57.81561pt too wide) in paragraph at lines 282--282 []\OT1/pcr/m/n/10.95 5 Temperature, wat er, degrees Celsius[] [] -Overfull \hbox (57.81561pt too wide) in paragraph at lines 287--287 +Overfull \hbox (57.81561pt too wide) in paragraph at lines 282--282 []\OT1/pcr/m/n/10.95 6 Temperature, wat er, degrees Celsius[] [] @@ -585,16 +585,16 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [4] -Package color Info: Redefining color shadecolor on input line 298. +Package color Info: Redefining color shadecolor on input line 293. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [5] -Package color Info: Redefining color shadecolor on input line 344. -Package color Info: Redefining color shadecolor on input line 362. +Package color Info: Redefining color shadecolor on input line 338. +Package color Info: Redefining color shadecolor on input line 356. -Overfull \hbox (30.64148pt too wide) in paragraph at lines 372--373 +Overfull \hbox (30.64148pt too wide) in paragraph at lines 366--367 []\OT1/ptm/m/n/10.95 Parameter in-for-ma-tion is ob-tained from []$\OT1/pcr/m/n /10.95 http : / / nwis . waterdata . usgs . gov / nwis / pmcodes/$[] [] @@ -604,9 +604,9 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [6] -Package color Info: Redefining color shadecolor on input line 383. -Package color Info: Redefining color shadecolor on input line 403. -Package color Info: Redefining color shadecolor on input line 423. +Package color Info: Redefining color shadecolor on input line 377. +Package color Info: Redefining color shadecolor on input line 395. +Package color Info: Redefining color shadecolor on input line 414. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] @@ -614,14 +614,14 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [7] LaTeX Warning: No positions in optional float specifier. - Default added (so using `tbp') on input line 440. + Default added (so using `tbp') on input line 430. -<figure/getNWIStemperaturePlot.pdf, id=213, 505.89pt x 505.89pt> +<figure/getNWIStemperaturePlot.pdf, id=214, 505.89pt x 505.89pt> File: figure/getNWIStemperaturePlot.pdf Graphic file (type pdf) <use figure/getNWIStemperaturePlot.pdf> Package pdftex.def Info: figure/getNWIStemperaturePlot.pdf used on input line 4 -42. +32. (pdftex.def) Requested size: 448.07928pt x 448.07928pt. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] @@ -633,25 +633,25 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [9 <D:/LADData/RCode/dataRetrieval/vignettes/figure/getNWIStemperaturePlot.pdf> ] -Package color Info: Redefining color shadecolor on input line 461. -Package color Info: Redefining color shadecolor on input line 475. +Package color Info: Redefining color shadecolor on input line 451. +Package color Info: Redefining color shadecolor on input line 464. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [10] -Package color Info: Redefining color shadecolor on input line 511. -Package color Info: Redefining color shadecolor on input line 536. +Package color Info: Redefining color shadecolor on input line 500. +Package color Info: Redefining color shadecolor on input line 522. LaTeX Warning: No positions in optional float specifier. - Default added (so using `tbp') on input line 545. + Default added (so using `tbp') on input line 531. -<figure/getQWtemperaturePlot.pdf, id=237, 505.89pt x 505.89pt> +<figure/getQWtemperaturePlot.pdf, id=238, 505.89pt x 505.89pt> File: figure/getQWtemperaturePlot.pdf Graphic file (type pdf) <use figure/getQWtemperaturePlot.pdf> -Package pdftex.def Info: figure/getQWtemperaturePlot.pdf used on input line 547 +Package pdftex.def Info: figure/getQWtemperaturePlot.pdf used on input line 533 . (pdftex.def) Requested size: 448.07378pt x 448.07928pt. @@ -664,24 +664,25 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [12 <D:/LADData/RCode/dataRetrieval/vignettes/figure/getQWtemperaturePlot.pdf>] -Overfull \hbox (50.793pt too wide) in paragraph at lines 560--561 +Overfull \hbox (50.793pt too wide) in paragraph at lines 546--547 \OT1/ptm/m/n/10.95 There are ad-di-tional data sets avail-able on the Wa-ter Qu al-ity Data Por-tal ([]$\OT1/pcr/m/n/10.95 http : / / www . waterqualitydata .$ [] -Package color Info: Redefining color shadecolor on input line 563. -LaTeX Font Info: Try loading font information for TS1+pcr on input line 565. +Package color Info: Redefining color shadecolor on input line 549. +LaTeX Font Info: Try loading font information for TS1+pcr on input line 551. ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\psnfss\ts1pcr.fd" File: ts1pcr.fd 2001/06/04 font definitions for TS1/pcr. ) -Package color Info: Redefining color shadecolor on input line 598. +Package color Info: Redefining color shadecolor on input line 584. -Overfull \hbox (5.25568pt too wide) in paragraph at lines 607--607 -[]\OT1/pcr/m/n/10.95 url_uv <- []\OT1/pcr/b/n/10.95 constructNWISURL[]\OT1/pcr/ -m/n/10.95 (siteNumber,[]"00060"[],startDate,endDate,[]\TS1/pcr/m/n/10.95 '\OT1/ -pcr/m/n/10.95 uv\TS1/pcr/m/n/10.95 '[]\OT1/pcr/m/n/10.95 )[] +Overfull \hbox (5.25568pt too wide) in paragraph at lines 593--593 +[][]\OT1/pcr/m/n/10.95 url_uv[] []<-[] []\OT1/pcr/b/n/10.95 constructNWISURL[][ +]\OT1/pcr/m/n/10.95 (siteNumber,[][]"00060"[][],startDate,endDate,[][]\TS1/pcr/ +m/n/10.95 '\OT1/pcr/m/n/10.95 uv\TS1/pcr/m/n/10.95 '[][]\OT1/pcr/m/n/10.95 )[][ +] [] @@ -689,15 +690,15 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [13] -Package color Info: Redefining color shadecolor on input line 628. -Package color Info: Redefining color shadecolor on input line 647. +Package color Info: Redefining color shadecolor on input line 614. +Package color Info: Redefining color shadecolor on input line 633. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [14] -Package color Info: Redefining color shadecolor on input line 702. -Package color Info: Redefining color shadecolor on input line 715. +Package color Info: Redefining color shadecolor on input line 688. +Package color Info: Redefining color shadecolor on input line 701. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] @@ -711,35 +712,35 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [17] -Package color Info: Redefining color shadecolor on input line 804. +Package color Info: Redefining color shadecolor on input line 790. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [18] -Package color Info: Redefining color shadecolor on input line 855. -LaTeX Font Info: Try loading font information for OMS+pcr on input line 860. +Package color Info: Redefining color shadecolor on input line 841. +LaTeX Font Info: Try loading font information for OMS+pcr on input line 846. ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\psnfss\omspcr.fd" File: omspcr.fd ) LaTeX Font Info: Font shape `OMS/pcr/m/n' in size <10.95> not available -(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 860. +(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 846. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [19] -Package color Info: Redefining color shadecolor on input line 884. -Package color Info: Redefining color shadecolor on input line 904. +Package color Info: Redefining color shadecolor on input line 870. +Package color Info: Redefining color shadecolor on input line 890. -Overfull \hbox (44.67563pt too wide) in paragraph at lines 929--929 +Overfull \hbox (44.67563pt too wide) in paragraph at lines 914--914 [] \OT1/pcr/m/n/10.95 First day of the discharge record is 2000-01-01 and last day is 2013-01-01[] [] -Overfull \hbox (44.67563pt too wide) in paragraph at lines 929--929 +Overfull \hbox (44.67563pt too wide) in paragraph at lines 914--914 [] \OT1/pcr/m/n/10.95 The first sample is from 2000-01-04 and the last sample i s from 2012-12-18[] [] @@ -749,16 +750,16 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [20] -Package color Info: Redefining color shadecolor on input line 961. +Package color Info: Redefining color shadecolor on input line 946. LaTeX Warning: No positions in optional float specifier. - Default added (so using `tbp') on input line 967. + Default added (so using `tbp') on input line 952. -<figure/egretEx.pdf, id=298, 505.89pt x 505.89pt> +<figure/egretEx.pdf, id=299, 505.89pt x 505.89pt> File: figure/egretEx.pdf Graphic file (type pdf) <use figure/egretEx.pdf> -Package pdftex.def Info: figure/egretEx.pdf used on input line 969. +Package pdftex.def Info: figure/egretEx.pdf used on input line 954. (pdftex.def) Requested size: 448.07378pt x 448.07928pt. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] @@ -769,28 +770,29 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [22 <D:/LADData/RCode/dataRetrieval/vignettes/figure/egretEx.pdf>] -Package color Info: Redefining color shadecolor on input line 995. -Package color Info: Redefining color shadecolor on input line 1005. +Package color Info: Redefining color shadecolor on input line 980. +Package color Info: Redefining color shadecolor on input line 990. -Overfull \hbox (51.24562pt too wide) in paragraph at lines 1016--1016 +Overfull \hbox (51.24562pt too wide) in paragraph at lines 1001--1001 [] \OT1/pcr/m/n/10.95 Sample1 <- localSample[!duplicated(localSample[c("DecYea r","ConcHigh")]),][] [] -Package color Info: Redefining color shadecolor on input line 1027. +Package color Info: Redefining color shadecolor on input line 1012. -Overfull \hbox (90.66557pt too wide) in paragraph at lines 1030--1030 -[][]\OT1/pcr/b/n/10.95 install.packages[]\OT1/pcr/m/n/10.95 ([]"dataRetrieval"[ -], repos=[]"http://usgs-r.github.com"[], type=[]"source"[])[] +Overfull \hbox (90.66557pt too wide) in paragraph at lines 1015--1015 +[][]\OT1/pcr/b/n/10.95 install.packages[][]\OT1/pcr/m/n/10.95 ([][]"dataRetriev +al"[][],[] []repos[][]=[][]"http://usgs-r.github.com"[][],[] []type[][]=[][]"so +urce"[][])[][] [] -Overfull \hbox (157.60596pt too wide) in paragraph at lines 1036--1037 +Overfull \hbox (157.60596pt too wide) in paragraph at lines 1021--1022 \OT1/ptm/m/n/10.95 C:/Users/userA/Documents/R/win-library/2.15/dataRetrieval, a nd the de-fault for a Mac: /Users/userA/Library/R/2.15/library/dataRetrieval. [] -Package color Info: Redefining color shadecolor on input line 1040. +Package color Info: Redefining color shadecolor on input line 1025. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] @@ -822,8 +824,8 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [28 ] -Package color Info: Redefining color shadecolor on input line 1227. -Package color Info: Redefining color shadecolor on input line 1265. +Package color Info: Redefining color shadecolor on input line 1212. +Package color Info: Redefining color shadecolor on input line 1249. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] @@ -831,45 +833,45 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [29 ] -Overfull \hbox (11.82567pt too wide) in paragraph at lines 1283--1283 +Overfull \hbox (11.82567pt too wide) in paragraph at lines 1267--1267 []\OT1/pcr/m/n/10.95 Suspended sediment concentration (SSC) 1980-10-01 1991-09- 30 3651 mg/l[] [] -<table1.png, id=348, 554.07pt x 125.71968pt> +<table1.png, id=349, 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 1302. +Package pdftex.def Info: table1.png used on input line 1286. (pdftex.def) Requested size: 554.06865pt x 125.71936pt. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [30 <D:/LADData/RCode/dataRetrieval/vignettes/table1.png>] -Underfull \hbox (badness 1983) in paragraph at lines 1318--1319 +Underfull \hbox (badness 1983) in paragraph at lines 1302--1303 []\OT1/ptm/m/n/10.95 Hirsch, R. M., Moyer, D. L. and Arch-field, S. A. (2010), Weighted Re-gres-sions on [] -Underfull \hbox (badness 1221) in paragraph at lines 1318--1319 +Underfull \hbox (badness 1221) in paragraph at lines 1302--1303 \OT1/ptm/m/n/10.95 Time, Dis-charge, and Sea-son (WRTDS), with an Ap-pli-ca-tio n to Chesa-peake Bay River [] -Underfull \hbox (badness 2443) in paragraph at lines 1318--1319 +Underfull \hbox (badness 2443) in paragraph at lines 1302--1303 \OT1/ptm/m/n/10.95 In-puts. JAWRA Jour-nal of the Amer-i-can Wa-ter Re-sources As-so-ci-a-tion, 46: 857-880. [] -Underfull \hbox (badness 3690) in paragraph at lines 1318--1319 +Underfull \hbox (badness 3690) in paragraph at lines 1302--1303 \OT1/ptm/m/n/10.95 doi: 10.1111/j.1752-1688.2010.00482.x []$\OT1/pcr/m/n/10.95 http : / / onlinelibrary . wiley . com / doi /$ [] -Package atveryend Info: Empty hook `BeforeClearDocument' on input line 1325. +Package atveryend Info: Empty hook `BeforeClearDocument' on input line 1309. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] @@ -877,20 +879,20 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [31 ] -Package atveryend Info: Empty hook `AfterLastShipout' on input line 1325. +Package atveryend Info: Empty hook `AfterLastShipout' on input line 1309. (D:\LADData\RCode\dataRetrieval\vignettes\dataRetrieval.aux) -Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 1325. -Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 1325. +Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 1309. +Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 1309. Package rerunfilecheck Info: File `dataRetrieval.out' has not changed. (rerunfilecheck) Checksum: E39EB3526BB75384BBF16131BFA2BB3D;2017. ) Here is how much of TeX's memory you used: - 8255 strings out of 494045 - 123288 string characters out of 3145961 - 216572 words of memory out of 3000000 - 11328 multiletter control sequences out of 15000+200000 - 30364 words of font info for 66 fonts, out of 3000000 for 9000 + 8254 strings out of 494045 + 123239 string characters out of 3145961 + 216276 words of memory out of 3000000 + 11325 multiletter control sequences out of 15000+200000 + 30981 words of font info for 68 fonts, out of 3000000 for 9000 715 hyphenation exceptions out of 8191 44i,15n,42p,912b,451s stack positions out of 5000i,500n,10000p,200000b,50000s {C:/Program Files (x86)/MiKTeX 2.9/fonts/enc/dvips/fontname/8r.enc}<C:/Progra @@ -898,12 +900,13 @@ m Files (x86)/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmmi10.pfb><C:/Program Files (x86)/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmsy10.pfb><C:/Program Fi les (x86)/MiKTeX 2.9/fonts/type1/urw/courier/ucrb8a.pfb><C:/Program Files (x86) /MiKTeX 2.9/fonts/type1/urw/courier/ucrr8a.pfb><C:/Program Files (x86)/MiKTeX 2 -.9/fonts/type1/urw/times/utmb8a.pfb><C:/Program Files (x86)/MiKTeX 2.9/fonts/ty -pe1/urw/times/utmr8a.pfb><C:/Program Files (x86)/MiKTeX 2.9/fonts/type1/urw/tim -es/utmri8a.pfb> -Output written on dataRetrieval.pdf (31 pages, 274754 bytes). +.9/fonts/type1/urw/courier/ucrro8a.pfb><C:/Program Files (x86)/MiKTeX 2.9/fonts +/type1/urw/times/utmb8a.pfb><C:/Program Files (x86)/MiKTeX 2.9/fonts/type1/urw/ +times/utmr8a.pfb><C:/Program Files (x86)/MiKTeX 2.9/fonts/type1/urw/times/utmri +8a.pfb> +Output written on dataRetrieval.pdf (31 pages, 288145 bytes). PDF statistics: - 425 PDF objects out of 1000 (max. 8388607) + 429 PDF objects out of 1000 (max. 8388607) 88 named destinations out of 1000 (max. 500000) 253 words of extra memory for PDF output out of 10000 (max. 10000000) diff --git a/vignettes/dataRetrieval.pdf b/vignettes/dataRetrieval.pdf index 9c3efd6b32f4a2d216c164cb05d1d4fe3a4e04f8..1def98857083c27b2beccf76cabc2af7c6078832 100644 Binary files a/vignettes/dataRetrieval.pdf and b/vignettes/dataRetrieval.pdf differ diff --git a/vignettes/dataRetrieval.synctex.gz b/vignettes/dataRetrieval.synctex.gz index afdb961fab745cec75a2b4700d648096d1b1a811..3305ddaeab67e20944babfcb89aef5ff1940aed0 100644 Binary files a/vignettes/dataRetrieval.synctex.gz and b/vignettes/dataRetrieval.synctex.gz differ diff --git a/vignettes/dataRetrieval.tex b/vignettes/dataRetrieval.tex index 4248bde759bed6ac0665bec36b8635eb607641c1..a39a5b7458beef5930e714cfa358fd3eccc76b3f 100644 --- a/vignettes/dataRetrieval.tex +++ b/vignettes/dataRetrieval.tex @@ -5,7 +5,7 @@ %\VignetteImports{zoo, XML, RCurl} %\VignettePackage{dataRetrieval} -\documentclass[a4paper,11pt]{article}\usepackage{graphicx, color} +\documentclass[a4paper,11pt]{article}\usepackage[]{graphicx}\usepackage[]{color} %% maxwidth is the original width if it is less than linewidth %% otherwise use linewidth (to make sure the graphics do not exceed the margin) \makeatletter @@ -18,21 +18,16 @@ } \makeatother -\definecolor{fgcolor}{rgb}{0.2, 0.2, 0.2} -\newcommand{\hlnumber}[1]{\textcolor[rgb]{0,0,0}{#1}}% -\newcommand{\hlfunctioncall}[1]{\textcolor[rgb]{0.501960784313725,0,0.329411764705882}{\textbf{#1}}}% -\newcommand{\hlstring}[1]{\textcolor[rgb]{0.6,0.6,1}{#1}}% -\newcommand{\hlkeyword}[1]{\textcolor[rgb]{0,0,0}{\textbf{#1}}}% -\newcommand{\hlargument}[1]{\textcolor[rgb]{0.690196078431373,0.250980392156863,0.0196078431372549}{#1}}% -\newcommand{\hlcomment}[1]{\textcolor[rgb]{0.180392156862745,0.6,0.341176470588235}{#1}}% -\newcommand{\hlroxygencomment}[1]{\textcolor[rgb]{0.43921568627451,0.47843137254902,0.701960784313725}{#1}}% -\newcommand{\hlformalargs}[1]{\textcolor[rgb]{0.690196078431373,0.250980392156863,0.0196078431372549}{#1}}% -\newcommand{\hleqformalargs}[1]{\textcolor[rgb]{0.690196078431373,0.250980392156863,0.0196078431372549}{#1}}% -\newcommand{\hlassignement}[1]{\textcolor[rgb]{0,0,0}{\textbf{#1}}}% -\newcommand{\hlpackage}[1]{\textcolor[rgb]{0.588235294117647,0.709803921568627,0.145098039215686}{#1}}% -\newcommand{\hlslot}[1]{\textit{#1}}% -\newcommand{\hlsymbol}[1]{\textcolor[rgb]{0,0,0}{#1}}% -\newcommand{\hlprompt}[1]{\textcolor[rgb]{0.2,0.2,0.2}{#1}}% +\definecolor{fgcolor}{rgb}{0.345, 0.345, 0.345} +\newcommand{\hlnum}[1]{\textcolor[rgb]{0.686,0.059,0.569}{#1}}% +\newcommand{\hlstr}[1]{\textcolor[rgb]{0.192,0.494,0.8}{#1}}% +\newcommand{\hlcom}[1]{\textcolor[rgb]{0.678,0.584,0.686}{\textit{#1}}}% +\newcommand{\hlopt}[1]{\textcolor[rgb]{0,0,0}{#1}}% +\newcommand{\hlstd}[1]{\textcolor[rgb]{0.345,0.345,0.345}{#1}}% +\newcommand{\hlkwa}[1]{\textcolor[rgb]{0.161,0.373,0.58}{\textbf{#1}}}% +\newcommand{\hlkwb}[1]{\textcolor[rgb]{0.69,0.353,0.396}{#1}}% +\newcommand{\hlkwc}[1]{\textcolor[rgb]{0.333,0.667,0.333}{#1}}% +\newcommand{\hlkwd}[1]{\textcolor[rgb]{0.737,0.353,0.396}{\textbf{#1}}}% \usepackage{framed} \makeatletter @@ -148,7 +143,7 @@ Not every station will measure all parameters. A short list of commonly measured % latex table generated in R 3.0.1 by xtable 1.7-1 package -% Thu Aug 01 16:23:09 2013 +% Wed Sep 04 12:53:33 2013 \begin{table}[ht] \centering \begin{tabular}{rll} @@ -174,7 +169,7 @@ 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 3.0.1 by xtable 1.7-1 package -% Thu Aug 01 16:23:09 2013 +% Wed Sep 04 12:53:33 2013 \begin{table}[ht] \centering \begin{tabular}{rll} @@ -210,10 +205,10 @@ Use the getSiteFileData function to obtain all of the information available for \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -\hlfunctioncall{library}(dataRetrieval) -\hlcomment{# Site ID for Choptank River near Greensboro, MD} -siteNumber <- \hlstring{"01491000"} -ChoptankInfo <- \hlfunctioncall{getSiteFileData}(siteNumber) +\hlkwd{library}\hlstd{(dataRetrieval)} +\hlcom{# Site ID for Choptank River near Greensboro, MD} +\hlstd{siteNumber} \hlkwb{<-} \hlstr{"01491000"} +\hlstd{ChoptankInfo} \hlkwb{<-} \hlkwd{getSiteFileData}\hlstd{(siteNumber)} \end{alltt} \end{kframe} \end{knitrout} @@ -224,7 +219,7 @@ A list of the available columns are found in Appendix \ref{sec:appendix2INFO}: I \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -ChoptankInfo$station.nm +\hlstd{ChoptankInfo}\hlopt{$}\hlstd{station.nm} \end{alltt} \begin{verbatim} [1] "CHOPTANK RIVER NEAR GREENSBORO, MD" @@ -244,9 +239,9 @@ To find out the available data at a particular USGS site, including measured par \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -\hlcomment{# Continuing from the previous example:} -ChoptankAvailableData <- \hlfunctioncall{getDataAvailability}(siteNumber) -\hlfunctioncall{head}(ChoptankAvailableData) +\hlcom{# Continuing from the previous example:} +\hlstd{ChoptankAvailableData} \hlkwb{<-} \hlkwd{getDataAvailability}\hlstd{(siteNumber)} +\hlkwd{head}\hlstd{(ChoptankAvailableData)} \end{alltt} \begin{verbatim} parameter_cd statCd startDate endDate count service @@ -297,21 +292,20 @@ It is also possible to only request parameter information for a subset of variab \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -\hlcomment{# Continuing from the previous example:} -\hlcomment{# This pulls out just the daily data:} -ChoptankDailyData <- \hlfunctioncall{subset}(ChoptankAvailableData, - \hlstring{"dv"} == service) - -\hlcomment{# This pulls out the mean:} -ChoptankDailyData <- \hlfunctioncall{subset}(ChoptankDailyData, - \hlstring{"00003"} == statCd) +\hlcom{# Continuing from the previous example:} +\hlcom{# This pulls out just the daily data:} +\hlstd{ChoptankDailyData} \hlkwb{<-} \hlkwd{subset}\hlstd{(ChoptankAvailableData,} + \hlstr{"dv"} \hlopt{==} \hlstd{service)} +\hlcom{# This pulls out the mean:} +\hlstd{ChoptankDailyData} \hlkwb{<-} \hlkwd{subset}\hlstd{(ChoptankDailyData,} + \hlstr{"00003"} \hlopt{==} \hlstd{statCd)} \end{alltt} \end{kframe} \end{knitrout} % latex table generated in R 3.0.1 by xtable 1.7-1 package -% Thu Aug 01 16:23:12 2013 +% Wed Sep 04 12:53:38 2013 \begin{table}[ht] \centering \begin{tabular}{rlllll} @@ -319,7 +313,7 @@ ChoptankDailyData <- \hlfunctioncall{subset}(ChoptankDailyData, & shortName & Start & End & Count & Units \\ \hline 1 & Temperature, water & 2010-10-01 & 2012-05-09 & 529 & deg C \\ - 2 & Stream flow, mean. daily & 1948-01-01 & 2013-07-31 & 23954 & cfs \\ + 2 & Stream flow, mean. daily & 1948-01-01 & 2013-09-03 & 23988 & ft3/s \\ 3 & Specific conductance & 2010-10-01 & 2012-05-09 & 527 & uS/cm @25C \\ 4 & Suspended sediment concentration (SSC) & 1980-10-01 & 1991-09-30 & 3651 & mg/l \\ 5 & Suspended sediment discharge & 1980-10-01 & 1991-09-30 & 3652 & tons/day \\ @@ -343,10 +337,10 @@ To obtain all of the available information concerning a measured parameter, use \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -\hlcomment{# Using defaults:} -parameterCd <- \hlstring{"00618"} -parameterINFO <- \hlfunctioncall{getParameterInfo}(parameterCd) -\hlfunctioncall{colnames}(parameterINFO) +\hlcom{# Using defaults:} +\hlstd{parameterCd} \hlkwb{<-} \hlstr{"00618"} +\hlstd{parameterINFO} \hlkwb{<-} \hlkwd{getParameterInfo}\hlstd{(parameterCd)} +\hlkwd{colnames}\hlstd{(parameterINFO)} \end{alltt} \begin{verbatim} [1] "parameter_cd" "parameter_group_nm" @@ -361,7 +355,7 @@ Pulling out a specific example piece of information, in this case parameter name \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -parameterINFO$parameter_nm +\hlstd{parameterINFO}\hlopt{$}\hlstd{parameter_nm} \end{alltt} \begin{verbatim} [1] "Nitrate, water, filtered, milligrams per liter as nitrogen" @@ -382,14 +376,12 @@ The dates (start and end) need to be in the format \texttt{"}YYYY-MM-DD\texttt{" \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} - -\hlcomment{# Continuing with our Choptank River example} -parameterCd <- \hlstring{"00060"} # \hlfunctioncall{Discharge} (cfs) -startDate <- \hlstring{""} # Will request earliest date -endDate <- \hlstring{""} # Will request latest date - -discharge <- \hlfunctioncall{retrieveNWISData}(siteNumber, - parameterCd, startDate, endDate) +\hlcom{# Continuing with our Choptank River example} +\hlstd{parameterCd} \hlkwb{<-} \hlstr{"00060"} \hlcom{# Discharge (cfs)} +\hlstd{startDate} \hlkwb{<-} \hlstr{""} \hlcom{# Will request earliest date} +\hlstd{endDate} \hlkwb{<-} \hlstr{""} \hlcom{# Will request latest date} +\hlstd{discharge} \hlkwb{<-} \hlkwd{retrieveNWISData}\hlstd{(siteNumber,} + \hlstd{parameterCd, startDate, endDate)} \end{alltt} \end{kframe} \end{knitrout} @@ -402,14 +394,13 @@ Another example that doesn't use the defaults would be a request for mean and ma \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} - -parameterCd <- \hlfunctioncall{c}(\hlstring{"00010"},\hlstring{"00060"}) # Temperature and discharge -statCd <- \hlfunctioncall{c}(\hlstring{"00001"},\hlstring{"00003"}) # Mean and maximum -startDate <- \hlstring{"2012-01-01"} -endDate <- \hlstring{"2012-05-01"} - -temperatureAndFlow <- \hlfunctioncall{retrieveNWISData}(siteNumber, parameterCd, - startDate, endDate, StatCd=statCd) +\hlstd{parameterCd} \hlkwb{<-} \hlkwd{c}\hlstd{(}\hlstr{"00010"}\hlstd{,}\hlstr{"00060"}\hlstd{)} \hlcom{# Temperature and discharge} +\hlstd{statCd} \hlkwb{<-} \hlkwd{c}\hlstd{(}\hlstr{"00001"}\hlstd{,}\hlstr{"00003"}\hlstd{)} \hlcom{# Mean and maximum} +\hlstd{startDate} \hlkwb{<-} \hlstr{"2012-01-01"} +\hlstd{endDate} \hlkwb{<-} \hlstr{"2012-05-01"} +\hlstd{temperatureAndFlow} \hlkwb{<-} \hlkwd{retrieveNWISData}\hlstd{(siteNumber, parameterCd,} + \hlstd{startDate, endDate,} \hlkwc{StatCd}\hlstd{=statCd)} +\hlstd{temperatureAndFlow} \hlkwb{<-} \hlkwd{renameColumns}\hlstd{(temperatureAndFlow)} \end{alltt} \end{kframe} \end{knitrout} @@ -422,20 +413,19 @@ An example of plotting the above data (Figure \ref{fig:getNWIStemperaturePlot}): \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -\hlfunctioncall{par}(mar=\hlfunctioncall{c}(5,5,5,5)) -colnames <- \hlfunctioncall{names}(temperatureAndFlow) -\hlfunctioncall{with}(temperatureAndFlow, \hlfunctioncall{plot}( - datetime, \hlfunctioncall{get}(colnames[6]), - xlab=\hlstring{"Date"},ylab=\hlstring{"Temperature [C]"} - )) -\hlfunctioncall{par}(new=TRUE) -\hlfunctioncall{with}(temperatureAndFlow, \hlfunctioncall{plot}( - \hlfunctioncall{get}(colnames[3]), \hlfunctioncall{get}(colnames[8]), - col=\hlstring{"red"},type=\hlstring{"l"},xaxt=\hlstring{"n"},yaxt=\hlstring{"n"},xlab=\hlstring{""},ylab=\hlstring{""},axes=FALSE - )) -\hlfunctioncall{axis}(4,col=\hlstring{"red"},col.axis=\hlstring{"red"}) -\hlfunctioncall{mtext}(\hlstring{"Discharge [cfs]"},side=4,line=3,col=\hlstring{"red"}) -\hlfunctioncall{title}(\hlfunctioncall{paste}(ChoptankInfo$station.nm,\hlstring{"2012"},sep=\hlstring{" "})) +\hlkwd{par}\hlstd{(}\hlkwc{mar}\hlstd{=}\hlkwd{c}\hlstd{(}\hlnum{5}\hlstd{,}\hlnum{5}\hlstd{,}\hlnum{5}\hlstd{,}\hlnum{5}\hlstd{))} +\hlkwd{with}\hlstd{(temperatureAndFlow,} \hlkwd{plot}\hlstd{(} + \hlstd{datetime, Temperature_water_01,} + \hlkwc{xlab}\hlstd{=}\hlstr{"Date"}\hlstd{,}\hlkwc{ylab}\hlstd{=}\hlstr{"Temperature [C]"} + \hlstd{))} +\hlkwd{par}\hlstd{(}\hlkwc{new}\hlstd{=}\hlnum{TRUE}\hlstd{)} +\hlkwd{with}\hlstd{(temperatureAndFlow,} \hlkwd{plot}\hlstd{(} + \hlstd{datetime, Stream_flow_mean_daily,} + \hlkwc{col}\hlstd{=}\hlstr{"red"}\hlstd{,}\hlkwc{type}\hlstd{=}\hlstr{"l"}\hlstd{,}\hlkwc{xaxt}\hlstd{=}\hlstr{"n"}\hlstd{,}\hlkwc{yaxt}\hlstd{=}\hlstr{"n"}\hlstd{,}\hlkwc{xlab}\hlstd{=}\hlstr{""}\hlstd{,}\hlkwc{ylab}\hlstd{=}\hlstr{""}\hlstd{,}\hlkwc{axes}\hlstd{=}\hlnum{FALSE} + \hlstd{))} +\hlkwd{axis}\hlstd{(}\hlnum{4}\hlstd{,}\hlkwc{col}\hlstd{=}\hlstr{"red"}\hlstd{,}\hlkwc{col.axis}\hlstd{=}\hlstr{"red"}\hlstd{)} +\hlkwd{mtext}\hlstd{(}\hlstr{"Discharge [cfs]"}\hlstd{,}\hlkwc{side}\hlstd{=}\hlnum{4}\hlstd{,}\hlkwc{line}\hlstd{=}\hlnum{3}\hlstd{,}\hlkwc{col}\hlstd{=}\hlstr{"red"}\hlstd{)} +\hlkwd{title}\hlstd{(}\hlkwd{paste}\hlstd{(ChoptankInfo}\hlopt{$}\hlstd{station.nm,}\hlstr{"2012"}\hlstd{,}\hlkwc{sep}\hlstd{=}\hlstr{" "}\hlstd{))} \end{alltt} \end{kframe}\begin{figure}[] @@ -460,12 +450,11 @@ Any data that are collected at regular time intervals (such as 15-minute or hour \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} - -parameterCd <- \hlstring{"00060"} # \hlfunctioncall{Discharge} (cfs) -startDate <- \hlstring{"2012-05-12"} -endDate <- \hlstring{"2012-05-13"} -dischargeToday <- \hlfunctioncall{retrieveUnitNWISData}(siteNumber, parameterCd, - startDate, endDate) +\hlstd{parameterCd} \hlkwb{<-} \hlstr{"00060"} \hlcom{# Discharge (cfs)} +\hlstd{startDate} \hlkwb{<-} \hlstr{"2012-05-12"} +\hlstd{endDate} \hlkwb{<-} \hlstr{"2012-05-13"} +\hlstd{dischargeToday} \hlkwb{<-} \hlkwd{retrieveUnitNWISData}\hlstd{(siteNumber, parameterCd,} + \hlstd{startDate, endDate)} \end{alltt} \end{kframe} \end{knitrout} @@ -510,22 +499,19 @@ To get USGS water quality data from water samples collected at the streamgage (a \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} - -\hlcomment{# Dissolved Nitrate parameter codes:} -parameterCd <- \hlfunctioncall{c}(\hlstring{"00618"},\hlstring{"71851"}) -startDate <- \hlstring{"1979-10-11"} -endDate <- \hlstring{"2012-12-18"} - -dissolvedNitrate <- \hlfunctioncall{getRawQWData}(siteNumber, parameterCd, - startDate, endDate) - -dissolvedNitrateSimple <- \hlfunctioncall{getQWData}(siteNumber, parameterCd, - startDate, endDate) -\hlfunctioncall{names}(dissolvedNitrateSimple) +\hlcom{# Dissolved Nitrate parameter codes:} +\hlstd{parameterCd} \hlkwb{<-} \hlkwd{c}\hlstd{(}\hlstr{"00618"}\hlstd{,}\hlstr{"71851"}\hlstd{)} +\hlstd{startDate} \hlkwb{<-} \hlstr{"1979-10-11"} +\hlstd{endDate} \hlkwb{<-} \hlstr{"2012-12-18"} +\hlstd{dissolvedNitrate} \hlkwb{<-} \hlkwd{getRawQWData}\hlstd{(siteNumber, parameterCd,} + \hlstd{startDate, endDate)} +\hlstd{dissolvedNitrateSimple} \hlkwb{<-} \hlkwd{getQWData}\hlstd{(siteNumber, parameterCd,} + \hlstd{startDate, endDate)} +\hlkwd{names}\hlstd{(dissolvedNitrateSimple)} \end{alltt} \begin{verbatim} -[1] "dateTime" "qualifier.71851" "value.71851" -[4] "qualifier.00618" "value.00618" +[1] "dateTime" "qualifier.00618" "value.00618" +[4] "qualifier.71851" "value.71851" \end{verbatim} \end{kframe} \end{knitrout} @@ -535,12 +521,12 @@ Note that in this dataframe, datetime is imported as Dates (no times are include \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -\hlfunctioncall{with}(dissolvedNitrateSimple, \hlfunctioncall{plot}( - dateTime, value.00618, - xlab=\hlstring{"Date"},ylab = \hlfunctioncall{paste}(parameterINFO$srsname, - \hlstring{"["},parameterINFO$parameter_units,\hlstring{"]"}) - )) -\hlfunctioncall{title}(ChoptankInfo$station.nm) +\hlkwd{with}\hlstd{(dissolvedNitrateSimple,} \hlkwd{plot}\hlstd{(} + \hlstd{dateTime, value.00618,} + \hlkwc{xlab}\hlstd{=}\hlstr{"Date"}\hlstd{,}\hlkwc{ylab} \hlstd{=} \hlkwd{paste}\hlstd{(parameterINFO}\hlopt{$}\hlstd{srsname,} + \hlstr{"["}\hlstd{,parameterINFO}\hlopt{$}\hlstd{parameter_units,}\hlstr{"]"}\hlstd{)} + \hlstd{))} +\hlkwd{title}\hlstd{(ChoptankInfo}\hlopt{$}\hlstd{station.nm)} \end{alltt} \end{kframe}\begin{figure}[] @@ -562,9 +548,9 @@ There are additional data sets available on the Water Quality Data Portal (\url{ \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -specificCond <- \hlfunctioncall{getWQPData}(\hlstring{'WIDNR_WQX-10032762'}, - \hlstring{'Specific conductance'}, \hlstring{''}, \hlstring{''}) -\hlfunctioncall{head}(specificCond) +\hlstd{specificCond} \hlkwb{<-} \hlkwd{getWQPData}\hlstd{(}\hlstr{'WIDNR_WQX-10032762'}\hlstd{,} + \hlstr{'Specific conductance'}\hlstd{,} \hlstr{''}\hlstd{,} \hlstr{''}\hlstd{)} +\hlkwd{head}\hlstd{(specificCond)} \end{alltt} \begin{verbatim} dateTime qualifier.Specific conductance @@ -597,14 +583,14 @@ There may be times when you might be interested in seeing the URL (web address) \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -\hlcomment{# Dissolved Nitrate parameter codes:} -pCode <- \hlfunctioncall{c}(\hlstring{"00618"},\hlstring{"71851"}) -startDate <- \hlstring{"1964-06-11"} -endDate <- \hlstring{"2012-12-18"} -url_qw <- \hlfunctioncall{constructNWISURL}(siteNumber,pCode,startDate,endDate,\hlstring{'qw'}) -url_dv <- \hlfunctioncall{constructNWISURL}(siteNumber,\hlstring{"00060"},startDate,endDate, - \hlstring{'dv'},statCd=\hlstring{"00003"}) -url_uv <- \hlfunctioncall{constructNWISURL}(siteNumber,\hlstring{"00060"},startDate,endDate,\hlstring{'uv'}) +\hlcom{# Dissolved Nitrate parameter codes:} +\hlstd{pCode} \hlkwb{<-} \hlkwd{c}\hlstd{(}\hlstr{"00618"}\hlstd{,}\hlstr{"71851"}\hlstd{)} +\hlstd{startDate} \hlkwb{<-} \hlstr{"1964-06-11"} +\hlstd{endDate} \hlkwb{<-} \hlstr{"2012-12-18"} +\hlstd{url_qw} \hlkwb{<-} \hlkwd{constructNWISURL}\hlstd{(siteNumber,pCode,startDate,endDate,}\hlstr{'qw'}\hlstd{)} +\hlstd{url_dv} \hlkwb{<-} \hlkwd{constructNWISURL}\hlstd{(siteNumber,}\hlstr{"00060"}\hlstd{,startDate,endDate,} + \hlstr{'dv'}\hlstd{,}\hlkwc{statCd}\hlstd{=}\hlstr{"00003"}\hlstd{)} +\hlstd{url_uv} \hlkwb{<-} \hlkwd{constructNWISURL}\hlstd{(siteNumber,}\hlstr{"00060"}\hlstd{,startDate,endDate,}\hlstr{'uv'}\hlstd{)} \end{alltt} \end{kframe} \end{knitrout} @@ -627,8 +613,8 @@ The function to obtain metadata, or data about the streamgage and measured param \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -parameterCd <- \hlstring{"00618"} -INFO <-\hlfunctioncall{getMetaData}(siteNumber,parameterCd, interactive=FALSE) +\hlstd{parameterCd} \hlkwb{<-} \hlstr{"00618"} +\hlstd{INFO} \hlkwb{<-}\hlkwd{getMetaData}\hlstd{(siteNumber,parameterCd,} \hlkwc{interactive}\hlstd{=}\hlnum{FALSE}\hlstd{)} \end{alltt} \end{kframe} \end{knitrout} @@ -646,14 +632,14 @@ The function to obtain the daily values (discharge in this case) is getDVData. \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -siteNumber <- \hlstring{"01491000"} -startDate <- \hlstring{"2000-01-01"} -endDate <- \hlstring{"2013-01-01"} -\hlcomment{# This call will get NWIS (cfs) data , and convert it to cms:} -Daily <- \hlfunctioncall{getDVData}(siteNumber, \hlstring{"00060"}, startDate, endDate) +\hlstd{siteNumber} \hlkwb{<-} \hlstr{"01491000"} +\hlstd{startDate} \hlkwb{<-} \hlstr{"2000-01-01"} +\hlstd{endDate} \hlkwb{<-} \hlstr{"2013-01-01"} +\hlcom{# This call will get NWIS (cfs) data , and convert it to cms:} +\hlstd{Daily} \hlkwb{<-} \hlkwd{getDVData}\hlstd{(siteNumber,} \hlstr{"00060"}\hlstd{, startDate, endDate)} \end{alltt} \begin{verbatim} -There are 4750 data points, and 4750 days. +There are 4750 data points, and 4750 days. \end{verbatim} \end{kframe} \end{knitrout} @@ -662,7 +648,7 @@ There are 4750 data points, and 4750 days. Details of the Daily dataframe are listed below: % latex table generated in R 3.0.1 by xtable 1.7-1 package -% Thu Aug 01 16:23:22 2013 +% Wed Sep 04 12:53:59 2013 \begin{table}[ht] \centering \begin{tabular}{rllll} @@ -701,9 +687,9 @@ The function to obtain USGS sample data from the water quality portal is getSamp \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -parameterCd <- \hlstring{"00618"} -Sample <-\hlfunctioncall{getSampleData}(siteNumber,parameterCd, - startDate, endDate) +\hlstd{parameterCd} \hlkwb{<-} \hlstr{"00618"} +\hlstd{Sample} \hlkwb{<-}\hlkwd{getSampleData}\hlstd{(siteNumber,parameterCd,} + \hlstd{startDate, endDate)} \end{alltt} \end{kframe} \end{knitrout} @@ -714,10 +700,10 @@ The function to obtain STORET sample data from the water quality portal is getST \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -site <- \hlstring{'WIDNR_WQX-10032762'} -characteristicName <- \hlstring{'Specific conductance'} -Sample <-\hlfunctioncall{getSTORETSampleData}(site,characteristicName, - startDate, endDate) +\hlstd{site} \hlkwb{<-} \hlstr{'WIDNR_WQX-10032762'} +\hlstd{characteristicName} \hlkwb{<-} \hlstr{'Specific conductance'} +\hlstd{Sample} \hlkwb{<-}\hlkwd{getSTORETSampleData}\hlstd{(site,characteristicName,} + \hlstd{startDate, endDate)} \end{alltt} \end{kframe} \end{knitrout} @@ -771,7 +757,7 @@ As an example to understand how the dataRetrieval package handles a more complex \begin{center} % latex table generated in R 3.0.1 by xtable 1.7-1 package -% Thu Aug 01 16:23:24 2013 +% Wed Sep 04 12:54:01 2013 \begin{table}[ht] \centering \begin{tabular}{rllrlrlr} @@ -854,10 +840,10 @@ The call to open this file, convert the discharge to cubic meters per second, an \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -fileName <- \hlstring{"ChoptankRiverFlow.txt"} -filePath <- \hlstring{"C:/RData/"} -Daily <- \hlfunctioncall{getDailyDataFromFile}(filePath,fileName, - separator=\hlstring{"\textbackslash{}t"}) +\hlstd{fileName} \hlkwb{<-} \hlstr{"ChoptankRiverFlow.txt"} +\hlstd{filePath} \hlkwb{<-} \hlstr{"C:/RData/"} +\hlstd{Daily} \hlkwb{<-} \hlkwd{getDailyDataFromFile}\hlstd{(filePath,fileName,} + \hlkwc{separator}\hlstd{=}\hlstr{"\textbackslash{}t"}\hlstd{)} \end{alltt} \end{kframe} \end{knitrout} @@ -883,10 +869,10 @@ The call to open this file, and populate the Sample dataframe would be: \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -fileName <- \hlstring{"ChoptankRiverNitrate.csv"} -filePath <- \hlstring{"C:/RData/"} -Sample <- \hlfunctioncall{getSampleDataFromFile}(filePath,fileName, - separator=\hlstring{","}) +\hlstd{fileName} \hlkwb{<-} \hlstr{"ChoptankRiverNitrate.csv"} +\hlstd{filePath} \hlkwb{<-} \hlstr{"C:/RData/"} +\hlstd{Sample} \hlkwb{<-} \hlkwd{getSampleDataFromFile}\hlstd{(filePath,fileName,} + \hlkwc{separator}\hlstd{=}\hlstr{","}\hlstd{)} \end{alltt} \end{kframe} \end{knitrout} @@ -903,19 +889,18 @@ Finally, there is a function called mergeReport that will look at both the Daily \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -siteNumber <- \hlstring{"01491000"} -parameterCd <- \hlstring{"00631"} # Nitrate -startDate <- \hlstring{"2000-01-01"} -endDate <- \hlstring{"2013-01-01"} - -Daily <- \hlfunctioncall{getDVData}(siteNumber, \hlstring{"00060"}, startDate, endDate) +\hlstd{siteNumber} \hlkwb{<-} \hlstr{"01491000"} +\hlstd{parameterCd} \hlkwb{<-} \hlstr{"00631"} \hlcom{# Nitrate} +\hlstd{startDate} \hlkwb{<-} \hlstr{"2000-01-01"} +\hlstd{endDate} \hlkwb{<-} \hlstr{"2013-01-01"} +\hlstd{Daily} \hlkwb{<-} \hlkwd{getDVData}\hlstd{(siteNumber,} \hlstr{"00060"}\hlstd{, startDate, endDate)} \end{alltt} \begin{verbatim} -There are 4750 data points, and 4750 days. +There are 4750 data points, and 4750 days. \end{verbatim} \begin{alltt} -Sample <- \hlfunctioncall{getSampleData}(siteNumber,parameterCd, startDate, endDate) -Sample <- \hlfunctioncall{mergeReport}() +\hlstd{Sample} \hlkwb{<-} \hlkwd{getSampleData}\hlstd{(siteNumber,parameterCd, startDate, endDate)} +\hlstd{Sample} \hlkwb{<-} \hlkwd{mergeReport}\hlstd{()} \end{alltt} \begin{verbatim} @@ -928,7 +913,7 @@ Sample <- \hlfunctioncall{mergeReport}() Percentage of the sample values that are censored is 0 % \end{verbatim} \begin{alltt} -\hlfunctioncall{head}(Sample) +\hlkwd{head}\hlstd{(Sample)} \end{alltt} \begin{verbatim} Date ConcLow ConcHigh Uncen ConcAve Julian Month @@ -960,9 +945,9 @@ As has been mentioned, the data is specifically formatted to be used with the EG \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -\hlcomment{# Continuing Choptank example from the previous sections} -\hlfunctioncall{library}(EGRET) -\hlfunctioncall{multiPlotDataOverview}() +\hlcom{# Continuing Choptank example from the previous sections} +\hlkwd{library}\hlstd{(EGRET)} +\hlkwd{multiPlotDataOverview}\hlstd{()} \end{alltt} \end{kframe}\begin{figure}[] @@ -994,7 +979,7 @@ At any time, you can get information about any function in R by typing a questio \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -?removeDuplicates +\hlopt{?}\hlstd{removeDuplicates} \end{alltt} \end{kframe} \end{knitrout} @@ -1004,7 +989,7 @@ To see the raw code for a particular code, type the name of the function: \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -removeDuplicates +\hlstd{removeDuplicates} \end{alltt} \begin{verbatim} function(localSample=Sample) { @@ -1026,8 +1011,8 @@ Before installing dataRetrieval, the zoo packages must be installed from CRAN: \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -\hlfunctioncall{install.packages}(\hlstring{"zoo"}) -\hlfunctioncall{install.packages}(\hlstring{"dataRetrieval"}, repos=\hlstring{"http://usgs-r.github.com"}, type=\hlstring{"source"}) +\hlkwd{install.packages}\hlstd{(}\hlstr{"zoo"}\hlstd{)} +\hlkwd{install.packages}\hlstd{(}\hlstr{"dataRetrieval"}\hlstd{,} \hlkwc{repos}\hlstd{=}\hlstr{"http://usgs-r.github.com"}\hlstd{,} \hlkwc{type}\hlstd{=}\hlstr{"source"}\hlstd{)} \end{alltt} \end{kframe} \end{knitrout} @@ -1039,7 +1024,7 @@ After installing the package, you need to open the library each time you re-star \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -\hlfunctioncall{library}(dataRetrieval) +\hlkwd{library}\hlstd{(dataRetrieval)} \end{alltt} \end{kframe} \end{knitrout} @@ -1056,7 +1041,7 @@ After installing the package, you need to open the library each time you re-star %------------------------------------------------------------ % latex table generated in R 3.0.1 by xtable 1.7-1 package -% Thu Aug 01 16:23:26 2013 +% Wed Sep 04 12:54:04 2013 \begin{table}[ht] \centering \begin{tabular}{rl} @@ -1122,7 +1107,7 @@ After installing the package, you need to open the library each time you re-star There are 62 columns returned from the water quality portal. % latex table generated in R 3.0.1 by xtable 1.7-1 package -% Thu Aug 01 16:23:26 2013 +% Wed Sep 04 12:54:04 2013 \begin{table}[ht] \centering \begin{tabular}{rl} @@ -1179,7 +1164,7 @@ There are 62 columns returned from the water quality portal. \FloatBarrier % latex table generated in R 3.0.1 by xtable 1.7-1 package -% Thu Aug 01 16:23:26 2013 +% Wed Sep 04 12:54:04 2013 \begin{table}[ht] \centering \begin{tabular}{rl} @@ -1226,19 +1211,18 @@ There are a few steps that are required in order to create a table in a Microsof \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -availableData <- \hlfunctioncall{getDataAvailability}(siteNumber) -dailyData <- availableData[\hlstring{"dv"} == availableData$service,] -dailyData <- dailyData[\hlstring{"00003"} == dailyData$statCd,] - -tableData <- \hlfunctioncall{with}(dailyData, - \hlfunctioncall{data.frame}( - shortName=srsname, - Start=startDate, - End=endDate, - Count=count, - Units=parameter_units) - ) -tableData +\hlstd{availableData} \hlkwb{<-} \hlkwd{getDataAvailability}\hlstd{(siteNumber)} +\hlstd{dailyData} \hlkwb{<-} \hlstd{availableData[}\hlstr{"dv"} \hlopt{==} \hlstd{availableData}\hlopt{$}\hlstd{service,]} +\hlstd{dailyData} \hlkwb{<-} \hlstd{dailyData[}\hlstr{"00003"} \hlopt{==} \hlstd{dailyData}\hlopt{$}\hlstd{statCd,]} +\hlstd{tableData} \hlkwb{<-} \hlkwd{with}\hlstd{(dailyData,} + \hlkwd{data.frame}\hlstd{(} + \hlkwc{shortName}\hlstd{=srsname,} + \hlkwc{Start}\hlstd{=startDate,} + \hlkwc{End}\hlstd{=endDate,} + \hlkwc{Count}\hlstd{=count,} + \hlkwc{Units}\hlstd{=parameter_units)} + \hlstd{)} +\hlstd{tableData} \end{alltt} \begin{verbatim} shortName Start @@ -1249,7 +1233,7 @@ tableData 5 Suspended sediment discharge 1980-10-01 End Count Units 1 2012-05-09 529 deg C -2 2013-07-31 23954 cfs +2 2013-09-03 23988 ft3/s 3 2012-05-09 527 uS/cm @25C 4 1991-09-30 3651 mg/l 5 1991-09-30 3652 tons/day @@ -1264,8 +1248,8 @@ First, save the dataframe as a tab delimited file (you don't want to use comma d \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} -\hlfunctioncall{write.table}(tableData, file=\hlstring{"tableData.tsv"},sep=\hlstring{"\textbackslash{}t"}, - row.names = FALSE,quote=FALSE) +\hlkwd{write.table}\hlstd{(tableData,} \hlkwc{file}\hlstd{=}\hlstr{"tableData.tsv"}\hlstd{,}\hlkwc{sep}\hlstd{=}\hlstr{"\textbackslash{}t"}\hlstd{,} + \hlkwc{row.names} \hlstd{=} \hlnum{FALSE}\hlstd{,}\hlkwc{quote}\hlstd{=}\hlnum{FALSE}\hlstd{)} \end{alltt} \end{kframe} \end{knitrout} diff --git a/vignettes/figure/egretEx.pdf b/vignettes/figure/egretEx.pdf index abea195b57302f3f31613fec67458ca0ba9e306f..c87255f3930e3fe52f3edeb2d6ab6e64c040483e 100644 Binary files a/vignettes/figure/egretEx.pdf and b/vignettes/figure/egretEx.pdf differ diff --git a/vignettes/figure/getNWIStemperaturePlot.pdf b/vignettes/figure/getNWIStemperaturePlot.pdf index 9ed9ce86f465f8b9e72fa78b6e7c4544bfc3b4b0..94b837efafd84e0a04937a5c203de8a0f0302fa7 100644 Binary files a/vignettes/figure/getNWIStemperaturePlot.pdf and b/vignettes/figure/getNWIStemperaturePlot.pdf differ diff --git a/vignettes/figure/getQWtemperaturePlot.pdf b/vignettes/figure/getQWtemperaturePlot.pdf index dd10677a2b3c7827775300fbbc193066db98cb9c..170c9fa2481bbb9eff18433cea0892e2dbd2fad5 100644 Binary files a/vignettes/figure/getQWtemperaturePlot.pdf and b/vignettes/figure/getQWtemperaturePlot.pdf differ