arrow_backRetour aux issues
Rekin226/aquascope
#270
Débutant
Ouvrirarrow_forward
Débutant
Ouvrirarrow_forward
Débutant
Ouvrirarrow_forward
The Explorer asks every agency for 40 years, and the note says it asked for everything
ecoDébutant
bug
help wanted
descriptionDescription
## Why this matters
`explorer/config.js:15` sets `years: 40`, and `explore.py` defaults to the same in `fetch_series` (`:166`) and `analyze_station` (`:486`). Nothing in the app can change it.
Clicking Colorado Rv at Austin sends `startDT=1986-08-23&endDT=2026-08-23` and gets 14,609 daily values back. USGS holds **46,924 daily mean discharge values for that gauge from 1898-03-01** (`00060`/`00003` in the site series catalog). So 69 % of the record never arrives, and Bulletin 17C runs on 39 annual maxima instead of roughly 120. On a flood-frequency estimate that is the difference between a usable confidence limit and a wide one.
Two things make it hard to spot:
- the station header prints `1898-03-01 → 2026-08-16` from the catalog, directly above a record card reading `1986-08-23 → 2026-08-22 · 40 yr`
- the note underneath says `USGS daily values (NWIS), full period requested.` (`explore.py:223`, and the Hub'Eau equivalent at `:246`), which is not what was requested
It also makes showcase replay unverifiable. The window rolls forward every day, so re-running a recorded example reports "0 returned exactly what was recorded" even when nothing is wrong.
## What to change
Three pieces, smallest first.
1. **Tell the truth in the note.** `explore.py:223` and `:246` should say what period went out, or drop the claim:
```python
note = f"USGS daily values (NWIS), {start} to {end}."
```
2. **Default to the whole record.** `years: int = 40` becomes `years: int | None = None`, and `None` means no `startDT` (USGS, Hub'Eau and the EA all return their full period when the start is omitted). `anywhere()` at `:532` keeps its 10-year climate default; that one is a forcing window, not a record.
3. **Let the reader choose.** A small period control in the station panel next to the record card: full record / 40 years / 20 years, written to the URL alongside `#s=` and `&tab=` so a link keeps it. `CONFIG.years` becomes the initial value rather than the only one.
Worth a guard on the fetch: 128 years of USGS daily values is about 1.5 MB of JSON, fine on a laptop and slow on a phone, so a "fetching the full record" line while it runs is kinder than a frozen panel.
## Steps
1. Fix the two note strings and add a test that pins them.
2. Make `years=None` mean the full period in `fetch_series`, and thread it through `analyze_station`.
3. Add the period control to `panel-station.js` and to the URL state in `url.js`.
4. Re-record the showcase afterwards, since every recorded number shifts.
## Acceptance criteria
- [ ] No note claims "full period requested" while sending a start date
- [ ] The default fetch for a station returns the agency's full record
- [ ] A period control in the station panel, reflected in the URL
- [ ] `analyze_station` still honours an explicit `years=` from MCP and the CLI
- [ ] Tests for the note text and for `years=None` producing no start bound
**Difficulty:** good second issue for the note and the control, a little more care in `fetch_series` · ~half a day.
Found while QA-ing the live Explorer on 2026-08-23 (build `bf7606a`).
Issues similaires
calkit/calkit
star53
Poids du dépôt moyen
VS Code extension should be robust to YAML parser errors
Seeing this error: ``` Failed to read calkit.yaml: YAMLParseError: A block sequence may not be used as an implicit map…
Python
bug
good first issue
fu351/Doberman-Core
star211
Poids du dépôt léger
dash: a manual Refresh control
The dashboard polls: `refreshStats()` (`src/doberman/dash/app.py:408`) every 5 s and `refreshPending()` (`:546`) every …
Python
enhancement
good first issue
fu351/Doberman-Core
star211
Poids du dépôt léger
dash: "Copy details" button on each pending-approval card
Each pending-approval card in the dashboard (`renderPending`, `src/doberman/dash/app.py:448-544`) shows the risk badge,…
Python
enhancement
good first issue