You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A GitHub Actions bot that monitors a USGS stream gauge and posts a daily field report — chart and stats — to Twitter/X and Bluesky. Automated. Unattended. Running whether you're watching or not.
5
+
Big Creek runs through the hills above Groveland, California — my hometown. It drains the western slope of the Sierra Nevada, feeds Don Pedro Reservoir, and in a wet year it moves. In a dry year it barely whispers. After a storm rolls through, it can go from 6 cfs to 300 cfs in a matter of hours.
6
+
7
+
This bot watches it so I don't have to.
8
+
9
+
---
10
+
11
+
## Latest reading
12
+
13
+

14
+
15
+
*Updated every 6 hours by GitHub Actions. [Live USGS page →](https://waterdata.usgs.gov/monitoring-location/11284400/)*
6
16
7
17
---
8
18
9
-
## What it does
19
+
## Why this gauge
10
20
11
-
Every 6 hours (configurable), it pulls real-time streamflow data from the USGS National Water Information System, generates a chart, and posts to social media.
21
+
**USGS 11284400 — Big C AB Whites Gulch NR Groveland CA**
12
22
13
-
**Each post includes:**
23
+
Big Creek is the kind of creek that doesn't make the news until it does. It's the creek that runs behind the properties off Ferretti Road, the one that crosses under the highway on the way into town, the one that tells you whether the hills are saturated or bone dry. When the Sierra gets hit by an atmospheric river, Big Creek is where you watch the pulse arrive first.
14
24
15
-
- Current discharge in cfs with trend direction
16
-
- Δ 1-hour and 24-hour change
17
-
- 7-day flow record with annotated peak
18
-
- Rate of change — accelerating, holding, decelerating
19
-
- Flow vs. historical average for this date
20
-
- Last-year reference
25
+
The gauge has been running since 1969. Fifty-six years of record. Every storm, every drought, every fire year, every flood — it's all in there. The bot plots where today sits against all of it.
26
+
27
+
Operated in cooperation with [Turlock Irrigation District](https://www.tid.org/), which manages Don Pedro downstream. They care about this number too.
28
+
29
+
---
30
+
31
+
## What the chart shows
32
+
33
+
-**Current flow** in cubic feet per second, with trend direction
34
+
-**7-day record** — the full hydrograph with annotated peak
35
+
-**Percentile bands** — green band is the normal range (p25–p75) based on 56 years of same-date data
36
+
-**Percentile needle** (right edge) — exactly where today's flow falls in the full historical distribution
37
+
-**Rate of change** — accelerating, holding, or dropping off
38
+
-**vs. long-term mean** — how this day compares to every same-date reading on record
21
39
22
40
---
23
41
24
42
## Repo layout
25
43
26
44
```
27
45
streamchaser/
28
-
├── .github/
29
-
│ └── workflows/
30
-
│ └── chase.yml # scheduled action
31
-
├── src/
32
-
│ └── streamchaser/
33
-
│ ├── __init__.py
34
-
│ ├── __main__.py # entry point
35
-
│ ├── gauge.py # USGS data fetching + stat computation
36
-
│ ├── chart.py # chart generation
37
-
│ ├── chart_preview.py # local visual test (no API calls)
Open `.github/workflows/chase.yml` and set these three env vars:
63
+
1. Fork the repo
64
+
2. Edit the three env vars in `chase.yml`:
58
65
59
66
```yaml
60
67
env:
@@ -63,103 +70,41 @@ env:
63
70
USGS_HASHTAGS: "#USGS #BigCreek #Groveland"
64
71
```
65
72
66
-
Find your station ID at [waterdata.usgs.gov](https://waterdata.usgs.gov/nwis/rt). Search by state, river, or location — look for a site with parameter `00060` (Discharge).
67
-
68
-
### 3. Add GitHub Secrets
69
-
70
-
**Settings → Secrets and variables → Actions → New repository secret**
71
-
72
-
#### Twitter / X
73
-
74
-
You need a free [developer account](https://developer.x.com) and an app with **Read + Write** permissions and **OAuth 1.0a** enabled.
| `TWITTER_ACCESS_SECRET` | Account Access Token Secret | same |
82
-
83
-
> **Note:** Access tokens are tied to *your account*. The app posts as you. Tokens generated under "Read only" permission won't work — regenerate them after switching to Read + Write.
84
-
85
-
#### Bluesky
86
-
87
-
No developer account needed. Just an App Password.
0 commit comments