Closed geomeg closed 1 year ago
If you run the whatNWISdata
function, you will see that the site only has discharge (parameterCd = "00060"), and not gage height (which is 00065) for daily data:
what_data <- whatNWISdata(siteNumber = siteNumber)
The column data_type_cd shows "dv" for daily values and "uv" for continuous data. So if you want daily data, you'll need to use discharge:
rawDailyData <- readNWISdv(siteNumbers = siteNumber,
parameterCd = "00060",
startDate = start_date,
endDate = end_date
)
If you want gage height, you'll need to use "uv" data:
rawUnitData <- readNWISuv(siteNumbers = siteNumber,
parameterCd = "00065",
startDate = start_date,
endDate = end_date
)
Let me know if that doesn't make sense.
Thank you!
On Mon, May 8, 2023 at 1:56 PM Laura DeCicco @.***> wrote:
If you run the whatNWISdata function, you will see that the site only has discharge (parameterCd = "00060"), and not gage height (which is 00065) for daily data:
what_data <- whatNWISdata(siteNumber = siteNumber)
The column data_type_cd shows "dv" for daily values and "uv" for continuous data. So if you want daily data, you'll need to use discharge:
rawDailyData <- readNWISdv(siteNumbers = siteNumber, parameterCd = "00060", startDate = start_date, endDate = end_date )
If you want gage height, you'll need to use "uv" data:
rawUnitData <- readNWISuv(siteNumbers = siteNumber, parameterCd = "00065", startDate = start_date, endDate = end_date )
Let me know if that doesn't make sense.
— Reply to this email directly, view it on GitHub https://github.com/DOI-USGS/dataRetrieval/issues/668#issuecomment-1538959803, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4PLXECPLABV6WONXRQOHA3XFFFYPANCNFSM6AAAAAAX2L3EV4 . You are receiving this because you authored the thread.Message ID: @.***>
When I run the following code, my rawDailyDate file is blank: siteNumber <- "07024175" # USGS site number for Mississippi River gage near New Madrid, MO, USA MississippiInfo <- readNWISsite(siteNumber) parameterCd <- "00065" start_date <- "2023-01-01" # Start date for data retrieval end_date <- "2023-05-01" # End date for data retrieval
Raw daily data:
rawDailyData <- readNWISdv( siteNumber, parameterCd, start_date, end_date ) pCode <- readNWISpCode(parameterCd)