1111# ' @param statCd string or vector USGS statistic code only used for daily value service.
1212# ' This is usually 5 digits. Daily mean (00003) is the default.
1313# ' @param service string USGS service to call. Possible values are "dv" (daily values),
14- # ' "uv" (unit/instantaneous values),
15- # ' "gwlevels" (groundwater),and "rating" (rating curve),
16- # ' "peak", "meas" (discrete streamflow measurements),
17- # ' "stat" (statistics web service BETA).
14+ # ' "uv" (unit/instantaneous values), and "rating" (rating curve),
15+ # ' "peak", "stat" (statistics web service BETA).
1816# ' @param format string, can be "tsv" or "xml", and is only applicable for daily
1917# ' and unit value requests. "tsv" returns results faster, but there is a possibility
2018# ' that an incomplete file is returned without warning. XML is slower,
5553# ' )
5654# ' url_rating <- constructNWISURL(site_id, service = "rating", ratingType = "base")
5755# ' url_peak <- constructNWISURL(site_id, service = "peak")
58- # ' url_meas <- constructNWISURL(site_id, service = "meas")
59- # ' url_gwl <- constructNWISURL(site_id, service = "gwlevels",
60- # ' startDate = "2024-05-01", endDate = "2024-05-30")
6156constructNWISURL <- function (siteNumbers ,
6257 parameterCd = " 00060" ,
6358 startDate = " " ,
@@ -71,8 +66,8 @@ constructNWISURL <- function(siteNumbers,
7166 statType = " mean" ) {
7267
7368 service <- match.arg(service , c(
74- " dv" , " uv" , " iv" , " iv_recent" , " gwlevels " ,
75- " rating" , " peak" , " meas " , " stat" ))
69+ " dv" , " uv" , " iv" , " iv_recent" ,
70+ " rating" , " peak" , " stat" ))
7671
7772 service [service == " meas" ] <- " measurements"
7873 service [service == " uv" ] <- " iv"
@@ -212,31 +207,7 @@ constructNWISURL <- function(siteNumbers,
212207 missingData = " off" )
213208 }
214209 },
215- gwlevels = {
216- url <- get_or_post(baseURL ,
217- POST = POST ,
218- site_no = siteNumbers ,
219- .multi = " comma" )
220- url <- get_or_post(url ,
221- POST = POST ,
222- format = " rdb" )
223- if (nzchar(startDate )) {
224- url <- get_or_post(url ,
225- POST = POST ,
226- begin_date = startDate )
227- }
228- if (nzchar(endDate )) {
229- url <- get_or_post(url ,
230- POST = POST ,
231- end_date = endDate )
232- }
233- url <- get_or_post(url ,
234- POST = POST ,
235- group_key = " NONE" ,
236- date_format = " YYYY-MM-DD" ,
237- rdb_compression = " value" )
238- },
239- { # this will be either dv, uv, groundwater
210+ { # this will be either dv, uv
240211
241212 format <- match.arg(format , c(" xml" , " tsv" , " wml1" , " wml2" , " rdb" ))
242213
0 commit comments