USGS Gauge Threshold Crossing Feed
Pricing
$1.00 / 1,000 delivered fresh usgs gauge checks
USGS Gauge Threshold Crossing Feed
Turn fresh USGS Water Data API v1 gauge readings into bounded, machine-readable site checks and threshold transitions from a prior Actor dataset. Explicit units, local gage datum, provisional status and freshness; no flood or safety verdict.
Pricing
$1.00 / 1,000 delivered fresh usgs gauge checks
Rating
0.0
(0)
Developer
Nathaniel Standridge
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
13 days ago
Last modified
Categories
Features
Share
Turn a short USGS streamgage watchlist into fresh, machine-readable site checks. Each delivered row includes the current value, exact unit, observation time, data approval status, threshold state, and any change from a prior row produced by this Actor. A recreation or water-data team can schedule the Actor, paste the previous dataset JSON into the next run, and send the resulting rows into a dashboard or workflow.
Quick start
- Run examples/input.json. It checks public USGS site
01646500for instantaneous streamflow parameter00060against a threshold of 10,000ft^3/s. - Read the default dataset for fresh checks and
OUTPUTfor requested, delivered, stale, missing, and source-error counts. The first run is a baseline:crossingisnone. - On the next run, paste the previous default dataset JSON array into
previousResultsJsonand keep the samemonitorKey. A comparable newer reading crossing the threshold producesentered_aboveorleft_above(or the correspondingbelowstates). examples/output.json shows one entered-above row. - Use
siteId,parameterCode, andmonitorKeyas an integration key. UseobservationIdto deduplicate delivery within one Actor run.
The Actor accepts at most 50 distinct site/parameter pairs and makes only fixed-host HTTPS requests to the official USGS Water Data API v1 latest-continuous endpoint. It never fetches a user-supplied URL, follows a source redirect, or forwards a credential. An explicit empty sites list makes no source request. maxRunSeconds bounds source work and delivery; maxAgeMinutes rejects old readings as uncharged diagnostics; lookbackHours limits how old a previous check may be for a crossing comparison. The Actor fetches the latest current reading, not all observations within the lookback. Intermediate crossings between checks can be missed.
Input contract
Each site needs an exact numeric USGS site ID, parameter code 00060 for streamflow or 00065 for gage height, direction (above or below), and a numeric threshold in the declared unit. The API's streamflow unit is ft^3/s; input also accepts ft3/s and normalizes it. Gage height uses ft. Comparisons are strict: exactly equal to the threshold is at, neither above nor below. To track both directions, make two separately labeled watchlists or use the row's thresholdState.
For 00065, datumBasis is site_local_gage_datum_no_geodetic_conversion. Gage height is relative to each site's local gage datum; this Actor does not turn it into a national vertical elevation or compare heights across sites. For streamflow, datum is not applicable. See USGS on gage height and the latest-continuous data dictionary.
previousResultsJson is optional user-supplied comparison evidence: up to 50 rows and 512 KiB, from this Actor's default dataset. There is no automatic account-wide history. A prior row with a different threshold, direction, unit, source time series, or statistic is marked incomparable. A prior reading outside lookbackHours or newer than the current reading cannot trigger a crossing. changedSinceLastRun means the selected threshold state entered or left the active side; it does not mean every change in numeric value.
Output and pricing
One fresh, validated site check row is the proposed $0.001 billing unit, including checks with no crossing. The Actor uses the default-dataset native event only once per delivered row. Missing, stale, invalid, ambiguous-series and undelivered checks produce no paid row; OUTPUT.diagnostics reports why. A two-site plan with a one-event cap writes no partial paid queue. Frozen RESULT_PLAN rows and a pending-delivery checkpoint prevent a restart from replaying an uncertain charged append; an unresolved write stops for reconciliation.
Rows expose observedAt, lastModifiedAt, ageMinutes, approvalStatus, and qualifiers. USGS says provisional values may be revised, and telemetry can be delayed. A threshold crossing here is a numeric dashboard signal, not a flood-stage, emergency, navigation, property-damage, or personal-safety assessment. This service is a machine-readable comparison convenience; free USGS WaterAlert already supports threshold email/SMS. Paid customer demand and net profit remain unmeasured.
The previous Actor dataset is comparison input. For operational monitoring, retain the prior dataset alongside your schedule and inspect OUTPUT on every run. If coverage is incomplete, retain the last trustworthy row and investigate the diagnostic rather than treating an absent row as recovery.
Source and migration
USGS announced Water Data API v1 as the successor to WaterServices. This Actor uses v1 directly. It currently supports two explicit parameter/unit pairs and a single unambiguous latest series per site/parameter. Source schema changes, site series changes, stale or duplicate series, and nonnumeric observations surface as diagnostics. No proxy, paid upstream data, or USGS API key is required for this bounded watchlist.