Skip to content

Kootenay vignette: sentences agree with the data they render - #149

Merged
NewGraphEnvironment merged 10 commits into
mainfrom
146-kootenay-vignette-five-sentences
Oct 17, 2026
Merged

NewGraphEnvironment merged 10 commits into
mainfrom
146-kootenay-vignette-five-sentences

Conversation

@NewGraphEnvironment

Copy link
Copy Markdown
Owner

Summary

  • Rewrites the sentences in the Kootenay Lake article that its own data contradicts. Soil moisture is declining, not flat. The warming range comes from the three ecoregions shown. The watershed groups agree in direction but only KOTL is significant. Both articles introduce four findings. The prose counts the three ecoregions it draws.
  • Fixes text found by the sweep and the plan review. The seasonal snow caption still carried Peace's −75 % / +37 % (Kootenay: −73 % / +12 %). "1.6 to 1.8 °C" should be 1.6 to 1.7. "Weeks earlier" was 12.6 days.
  • Numbers in those sentences are computed inline at render from the bundled rds. The words around them ("significant", "every", "only KOTL", "about a quarter") are asserted by the claims block in data-raw/kootenay_lake_vignette_data.R, so a regen that makes one false stops before it saves. Each claim tests the value as the page prints it.
  • Kootenay's ecoregion filter moves to Peace's 100 km². That draws the same three ecoregions, and a claim checks the prose states the threshold.

No change under R/, and no rds regen.

Related Issues

Test plan

  • devtools::test(): FAIL 0, PASS 768
  • Both changed articles render with the branch installed; each rewritten sentence read back from the HTML
  • Claims block evaluated offline against the committed rds: all pass. 43 in-memory perturbations: 40 fire on their claim, 3 pass correctly
  • Plan review plus /code-check branch, 4 rounds, ended by checking all 23 claims against the printed-value rule (planning/archive/2026-10-issue-146-kootenay-vignette-sentences/)

Notes

The claims run only when the data script regenerates the rds. The data-raw/vignette_data_*_patch.R scripts write the rds without running them, so they guard a full regen only.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GignjoKpZADXywTf6pAMgj

NewGraphEnvironment and others added 10 commits October 16, 2026 07:57
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GignjoKpZADXywTf6pAMgj
Soil moisture is declining, not flat; the warming range and rate come
from the three ecoregions shown; the WSG drying is consistent in
direction, not strength; both articles introduce four findings, not
three. Numbers are computed inline; the words around them (significant,
every, only KOTL) are asserted in the data script's claims block.
Kootenay's ecoregion filter moves to Peace's 100 km², which shows the
same three ecoregions.

Relates to #146

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GignjoKpZADXywTf6pAMgj
The caption carried Peace's numbers (summer SWE -75%, spring snowmelt
+37%); Kootenay's are -73% and +12%, with winter snowmelt up 138%. It is
now computed from the table, and the data script asserts the words
around it. The sweep of the article's other quantified sentences is in
the PWF findings.

Fixes #146

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GignjoKpZADXywTf6pAMgj
The temperature range is 1.6 to 1.7 °C, now computed inline; the snow
table shows three variables; the freshet arrives nearly two weeks
earlier, not weeks; summer snowpack holds about a quarter of what it
did. Two more claims: the prose's area threshold matches the filter,
and precipitation fell over the window in every ecoregion shown.

Relates to #146

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GignjoKpZADXywTf6pAMgj
Code-check round 1: three claims guarded a significance test but not
the direction the sentence states, so a rising soil-moisture trend or
window would have passed. Every claim that sits beside a direction word
now checks the sign, and the regional temperature sentence gets its own
claim.

Relates to #146

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GignjoKpZADXywTf6pAMgj
Code-check round 2 found two more direction words with no sign check,
inside round 1's fix. Enumerating every static word the branch added
found two number-words unguarded as well. Each now has a claim: summer
losses are negative, each shown ecoregion's window is warmer and within
a few tenths of the others, a quarter of summer snowpack remains, and
the freshet moved nearly two weeks.

Relates to #146

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GignjoKpZADXywTf6pAMgj
Code-check round 3: the number-word bounds admitted false words (a
third for a quarter, 10 days for nearly two weeks, no spread for a few
tenths); significance was tested on the raw p while the page prints a
rounded one; relative humidity and the snow-cover sentence had no
working guard.

Relates to #146

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GignjoKpZADXywTf6pAMgj
Code-check round 4 found claims still testing raw values where the page
prints rounded ones. Each claim beside a printed number now tests its
printed form, through helpers named for the Rmd's formats; all 23 claims
were checked against that rule.

Relates to #146

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GignjoKpZADXywTf6pAMgj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GignjoKpZADXywTf6pAMgj
@NewGraphEnvironment
NewGraphEnvironment merged commit 1235356 into main Oct 17, 2026
1 check passed
@NewGraphEnvironment
NewGraphEnvironment deleted the 146-kootenay-vignette-five-sentences branch October 17, 2026 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kootenay vignette: five sentences inherited from Peace contradict the Kootenay data

1 participant