Closed lindsayplatt closed 2 years ago
@lindsayplatt , install dataRetrieval
from GitHub and try a few of your workflows. Let me know if anything seems funky.
remotes::install_github("USGS-R/dataRetrieval")
This command is only giving me one row of data now!
multi_hucs <- c("07130007", "07130011")
dataRetrieval::readNWISdata(huc = multi_hucs,
parameterCd = "63680",
startDate = "2015-06-18",
endDate = "2015-06-18",
service="dv") %>%
filter(site_no == "05586300")
agency_cd site_no dateTime X_.YSI._63680_00002 X_.YSI._63680_00002_cd X_.HACH._63680_00001 X_.HACH._63680_00001_cd
1 USGS 05586300 2015-06-18 63 A 260 A
X_.YSI._63680_00001 X_.YSI._63680_00001_cd X_.YSI._63680_00003 X_.YSI._63680_00003_cd X_.HACH._63680_00002
1 NA <NA> NA <NA> 94
X_.HACH._63680_00002_cd X_.HACH._63680_00003 X_.HACH._63680_00003_cd tz_cd
1 A 154 A UTC
The values do match the ones when I query just the one HUC 👍 There are more columns than just the one HUC because I queried for more data and then just filtered one the site_no
column.
Describe the bug For some reason, site
05586300
which is in HUC07130011
(verified usingreadNWISsite("05586300")
) is triggering data to be returned when you query HUC07130007
, too, but only when that HUC is queried at the same time as07130011
.To Reproduce
When you query ONLY HUC
07130011
, you get one row of data back for that site on 2015-06-18. When you make a query to ONLY HUC07130007
, you get no data back for this site on 2015-06-18. BUT if you query both HUCs in one call toreadNWISdata()
, it returns two rows of data for that one site on 2015-06-18. And that data is not a full duplicate of the data you get back from only querying HUC07130011
; it's only a partial duplicate.Expected behavior I would expect these two commands to return the exact same thing since the only difference is which HUCs are being queried and the site should only exist in one HUC:
Session Info Please include your session info:
Additional context I would not like the resolution to just be to call one HUC at a time because my workflow is setup in a way to group HUCs and make a smaller number of queries but do multiple HUCs at once.