Closed albrechtcf closed 2 years ago
The first think I would check is:
y <- whatNWISdata(siteNumber="08038000")
If I look at that table, I see gage height is only available in the data_type_cd = "uv", which means you can get gage height like this:
att.chi <- dataRetrieval::readNWISdata(
siteNumber="08038000",
service = "uv", #This is the different line!
asDateTime = TRUE,
convertType = TRUE,
startDate = call.begin,
endDate = call.end,
tz = "America/Chicago",
parameterCd = c("00065") )
However...now you have "unit" data instead of daily data. You can also look at that "y" data frame above and see there's daily discharge data for that site (pcode 00060). If using discharge is an option, than that's one solution. The other would be to group the unit data by day, and take the mean yourself...it should be pretty reasonable to do with the data.table
package you are using.
Thank you!
I am unable to retrieve gage height values from gage #08038000. The code that I'm using successfully retrieves data from nearby gages, such as Angelina at Alto (gage #08036500). Code below shows two uses of
readNWISdata()
, where the first ("ang.alt<-
...) functions normally and the second ("att.chi<-
...) does not.The first code block ("ang.alt<-..." ) functions as expected.
The second ("att.chi<-..."), when run, generates a 4-column data table with no rows.
Can you help me figure out why I'm unable to retrieve gage height from gage #08038000?