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

Took out option check because WQP does it too.

parent c79b04bb
No related branches found
No related tags found
1 merge request!63More error handling, specifically WQP.
...@@ -95,11 +95,12 @@ readWQPdata <- function(...){ ...@@ -95,11 +95,12 @@ readWQPdata <- function(...){
matchReturn <- list(...) matchReturn <- list(...)
options <- c("bBox","lat","long","within","countrycode","statecode","countycode","siteType","organization", # WQP does a better job of this in the header return:
"siteid","huc","sampleMedia","characteristicType","characteristicName","pCode","activityId", # options <- c("bBox","lat","long","within","countrycode","statecode","countycode","siteType","organization",
"startDateLo","startDateHi","mimeType","Zip","providers") # "siteid","huc","sampleMedia","characteristicType","characteristicName","pCode","activityId",
# "startDateLo","startDateHi","mimeType","Zip","providers")
if(!all(names(matchReturn) %in% options)) warning(matchReturn[!(names(matchReturn) %in% options)],"is not a valid query parameter to the Water Quality Portal") #
# if(!all(names(matchReturn) %in% options)) warning(names(matchReturn)[!(names(matchReturn) %in% options)]," is not a valid query parameter to the Water Quality Portal")
values <- sapply(matchReturn, function(x) URLencode(as.character(paste(eval(x),collapse="",sep="")))) values <- sapply(matchReturn, function(x) URLencode(as.character(paste(eval(x),collapse="",sep=""))))
......
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