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

Changed agency to agency_cd to match rdb.

parent 07b2f10c
No related branches found
No related tags found
1 merge request!46Adding attributes to WQP requests.
...@@ -310,9 +310,9 @@ importWaterML1 <- function(obs_url,asDateTime=FALSE, tz=""){ ...@@ -310,9 +310,9 @@ importWaterML1 <- function(obs_url,asDateTime=FALSE, tz=""){
colNames <- names(df) colNames <- names(df)
if( exists("qualName")){ if( exists("qualName")){
columnsOrdered <- c("agency","site_no","dateTime","tz_cd",attributeNames[attributeNames != "dateTime"],qualName,valueName) columnsOrdered <- c("agency_cd","site_no","dateTime","tz_cd",attributeNames[attributeNames != "dateTime"],qualName,valueName)
} else { } else {
columnsOrdered <- c("agency","site_no","dateTime","tz_cd",attributeNames[attributeNames != "dateTime"],valueName) columnsOrdered <- c("agency_cd","site_no","dateTime","tz_cd",attributeNames[attributeNames != "dateTime"],valueName)
} }
columnsOrderd <- columnsOrdered[columnsOrdered %in% names(df)] columnsOrderd <- columnsOrdered[columnsOrdered %in% names(df)]
...@@ -343,7 +343,7 @@ importWaterML1 <- function(obs_url,asDateTime=FALSE, tz=""){ ...@@ -343,7 +343,7 @@ importWaterML1 <- function(obs_url,asDateTime=FALSE, tz=""){
siteInfo <- data.frame(station_nm=extraSiteData$siteName, siteInfo <- data.frame(station_nm=extraSiteData$siteName,
site_no=extraSiteData$siteCode$text, site_no=extraSiteData$siteCode$text,
agency=extraSiteData$siteCode$.attrs[["agencyCode"]], agency_cd=extraSiteData$siteCode$.attrs[["agencyCode"]],
timeZoneOffset=extraSiteData$timeZoneInfo$defaultTimeZone[1], timeZoneOffset=extraSiteData$timeZoneInfo$defaultTimeZone[1],
timeZoneAbbreviation=extraSiteData$timeZoneInfo$defaultTimeZone[2], timeZoneAbbreviation=extraSiteData$timeZoneInfo$defaultTimeZone[2],
dec_lat_va=as.numeric(extraSiteData$geoLocation$geogLocation$latitude), dec_lat_va=as.numeric(extraSiteData$geoLocation$geogLocation$latitude),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment