USGS Water Services Agent
Copyright © 2018 EarthSoft, Inc • Modified: 12 Dec 2018
The USGS (United States Geological Survey) Water Services Agent is a data loading agent available in EQuIS Live for obtaining water data from the following USGS Water Services web APIs:
Before using the USGS Water Services Agent, add one or more sites to the DT_LOGGER table:
1.Execute the equis.get_ids stored procedure to get a new LOGGER_ID, or add the site (DT_LOGGER row) in EQuIS Professional.
2.Set LIVE_DATA_SOURCE to USGS-WS-IV to get Instantaneous Values, USGS-WS-DV to get Daily Values, or USGS-WS-GW to get Groundwater Levels.
Note: You can view a site's info, including its available data, by clicking on its site link. For example, go to https://waterdata.usgs.gov/nwis/inventory?agency_code=USGS&site_no=01646502, where 01646502 is a USGS site number, zero-padded to 8 digits.
4.Set STATUS_FLAG to 'A' to activate the logger.
The USGS Water Services Instantaneous Values Agent, Daily Values Agent, Groundwater Levels Agent or Historical Data Loader can be run as a scheduled EQuIS Information Agent (EIA), at the desired frequency, to automatically load data as often as needed.
The USGS Water Services Agents or Historical Data Loader can also be run in EQuIS Professional or Enterprise (using the EZView widget) to load the data manually, without having to schedule an EIA.
The USGS Water Services Instantaneous Values, Daily Values, and Groundwater Levels Agents will load values for all loggers with LIVE_DATA_SOURCE set to USGS-WS-IV, USGS-WS-DV and USGS-WS-GW, respectively.
When the report is run initially, the agent will retrieve values from a logger's site (DT_LOGGER.LOGGER_CODE) for the past one month. If data has been previously loaded for that logger, the agent will request data from the logger's most recent date (in DT_LOGGER_DATUM.DATUM_UTC_DT) until today's date.
The USGS Water Services Historical Data Loader allows you to select the (IV, DV, and/or GW) loggers and date range. It has the following input parameters:
•Logger(s) – Select the sites for which you want to load data. If no sites are selected, the agent will load data for all USGS Water Services sites.
•Date Range – Select a date range; choose from recent, period, or start and end dates. The recent option works the same way as the USGS Water Services Instantaneous Values, Daily Values, and Groundwater Levels Agents. If you select the period option, you must enter a period in ISO-8601 duration format. If you select the start and end dates option, you must select start and end dates.
•Parameter Codes – You can load data for a subset of parameter codes by adding them here (as a comma-separated string, e.g. 60,65). Leave this field empty to get all available parameter codes.
•Update existing values? – Check this box to update existing EQuIS Live data values.
•Max Period Per Request – When requesting a large date range from the web API, it may take a long time to return the data, causing the request to timeout, and, if it encounters an error, it may not return any data at all. You can use this parameter to break up one request into multiple requests, each of this period, in ISO-8601 duration format (e.g.. P12M requests up to 12 months of data at a time).