USGS Data Fetching
Revision as of 16:05, 29 May 2025 by DaveSanderman (talk | contribs)
USGS Data Fetching
We use URLs of the following format to fetch USGS data:
https://waterservices.usgs.gov/nwis/iv/?format=json&indent=on¶meterCd=00060,00065&siteStatus=all&sites=12141300&period=PT22M29.5308163S
This is provided by the "Instantaneous Values" service, documented here: https://waterservices.usgs.gov/docs/instantaneous-values/instantaneous-values-details/
The important pieces of the URL:
- parameterCd=00060,00065 -- This indicates that we want parameters 00060 and 00065, which are water height and discharge
- sites=12141300 -- This is which gauge we want to look at
- period=PT22M29.5308163S -- This is the time range we want to fetch data for; basically it will be an encoded version of "since the last time we asked".