readNWISgwl missing approval status
Created by: lmdebrew
When using readNWISgwl in dataRetrieve, the water-level approval code is missing (as well as a few other fields). This column should be available in the data frame and is most helpful when the user wants to filter and only run analysis on approved record. Also, user will be able to combine the discrete data with time-series data from the same site and have the approval status for all records.
readNWISgwl URL shows that retrievals use format=rdb,1.0 (see URL attribute example below). The following columns are missing from the data frame when using this output format: lev_dt_acy_cd Water-level date-time accuracy lev_acy_cd Water-level accuracy lev_src_cd Source of measurement lev_meth_cd Method of measurement lev_age_cd Water-level approval status
Example discrete output library(dataRetrieval) library(dplyr) co_df <- readNWISgwl(382323104200701, "2015-01-01") attr(co_df, "url")
Using format=rdb instead will give you the additional fields: https://waterservices.usgs.gov/nwis/gwlevels/?site=382323104200701&format=rdb&startDT=2015-01-01
When retrieving the daily value from the same site, readNWISdv output format from waterservices is in waterml 1.1 and includes the approval code.
Example DV output co_df2 <- readNWISdv(382323104200701, 72019, "2015-01-01") attr(co_df2, "url")