Commit b737c3a8 authored by David Watkins's avatar David Watkins
Browse files

small changes. Need to reorganize branches to split off NGWMN stuff

parent ccaa1e0f
......@@ -73,6 +73,7 @@ importFrom(readr,read_delim)
importFrom(readr,read_lines)
importFrom(reshape2,dcast)
importFrom(reshape2,melt)
importFrom(stats,na.omit)
importFrom(xml2,read_xml)
importFrom(xml2,xml_attr)
importFrom(xml2,xml_attrs)
......
......@@ -30,6 +30,8 @@
#' data <- importNGWMN_wml2(url)
#' }
#'
#'
#TODO: separate id and agency name, give also as separate dimensions
importNGWMN_wml2 <- function(input, asDateTime=FALSE, tz=""){
if(tz != ""){
tz <- match.arg(tz, c("America/New_York","America/Chicago",
......
......@@ -15,6 +15,7 @@
#' @importFrom dplyr mutate
#' @importFrom dplyr bind_rows
#' @importFrom dplyr bind_cols
#' @importFrom stats na.omit
#' @export
#' @examples
#' \dontrun{
......@@ -36,7 +37,8 @@
#' noDataSite <- readNGWMNdata(featureID = noDataSite, service = "observation")
#' }
#'
#TODO: accept colon or period! change examples
#TODO: deal with NA fIDs
readNGWMNdata <- function(..., service = "observation", asDateTime = TRUE, tz = ""){
message(" ********************************************************
DISCLAIMER: NGWMN retrieval functions are still in flux,
......@@ -52,7 +54,11 @@ readNGWMNdata <- function(..., service = "observation", asDateTime = TRUE, tz =
allSites <- NULL
#these attributes are pulled out and saved when doing binds to be reattached
attrs <- c("url","gml:identifier","generationDate","responsibleParty", "contact")
featureID <- as.vector(dots[['featureID']])
featureID <- na.omit(gsub(":",".",dots[['featureID']]))
#featureID <- na.omit(featureID)
#featureID <- featureID[!is.na(featureID)]
#featureID <- gsub(":",".",featureID) #getFeatureOfInterest returns with colons
#TODO: call featureOfInterest outside loop
for(f in featureID){
obsFID <- retrieveObservation(featureID = f, asDateTime, attrs)
......
......@@ -36,5 +36,6 @@ Interest=VW_GWDP_GEOSERVER.USGS.474011117072901"
data <- importNGWMN_wml2(url)
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment