Skip to content

Watershed group x ecoregion overlap section + canonical 16-WSG list#51

Merged
NewGraphEnvironment merged 1 commit into
mainfrom
47-wsg-ecoregion-overlap
May 2, 2026
Merged

Watershed group x ecoregion overlap section + canonical 16-WSG list#51
NewGraphEnvironment merged 1 commit into
mainfrom
47-wsg-ecoregion-overlap

Conversation

@NewGraphEnvironment
Copy link
Copy Markdown
Owner

Summary

Adds a "Watershed Groups Across Ecoregions" section to the peace-fwcp vignette and canonicalizes the FWCP Peace watershed-group list to 16. Lets readers connect per-ecoregion climate-departure findings to the watershed-group reporting unit (the unit FWCP funds work in, the unit our fish-passage reports use).

Headline additions:

  • New map: 16 canonical FWCP Peace watershed groups labelled with codes, on top of ecoregion fills.
  • New table: per-watershed-group share of area in each of the five ecoregions.
  • Canonical 16-WSG list hardcoded in data-raw/example_context_fwcp_peace.R for reuse: CARP, CRKD, FINA, FINL, FIRE, FOXR, INGR, LOMI, MESI, NATR, OSPK, PARA, PARS, PCEA, TOOD, UOMI. Each is ≥99% inside the FWCP polygon. Drops UPCE (11.8% inside; main drainage runs east past FWCP) and MURR (1% sliver).

Other improvements rolled in:

  • Recent vs Pre-warming consolidated to one table (variable, period, recent mean, pre-warming mean, Δ absolute, Δ %, trend p) instead of the previous two near-redundant tables. Single plain-language interp paragraph above the table states temperature/VPD/precipitation/SM signals cleanly.
  • Spatial Pattern interp paragraph moved above the map so readers see the east-west gradient finding before the figure.
  • Per-Ecoregion Variation gains a brief interp paragraph above the facets (uniform warming, precipitation diverges in the north, VPD up in all five).
  • Day-night asymmetry headline moved into the section's intro paragraph so the reader sees the conclusion before the figures.
  • Tightened acronyms: "AOI" → "area of interest", "BC" → "British Columbia". Removed the Arctic-draining clarification and the cross-vignette KOTL reference.
  • load-vignette-data chunk now visible — reader sees how ts and downstream products materialize from the cache.
  • Removed the bottom "A note on reproducibility" section (provenance is in chunk comments).

Caption fix worth calling out:

All six tables now render with single, clean bookdown captions. Fixed a kableExtra + bookdown double-caption issue: pass label = NA alongside caption = "..." to the inner knitr::kable(). The tab.cap chunk option I tried earlier silently drops captions when the table is wrapped in kable_styling() + scroll_box(). Memory updated.

Test plan

  • data-raw/example_context_fwcp_peace.R runs end-to-end with the hardcoded 16-WSG list, regenerates the bundled gpkg with 16 WSGs
  • data-raw/peace_wsg_ecoregion_commentary.R runs and produces the 16-row commentary CSV
  • devtools::build_rmd("vignettes/peace-fwcp.Rmd") renders cleanly in ~10 s
  • All 6 tables in the rendered html have unique, single Table N: prefixes (verified via grep on rendered html)
  • WSG map shows the 16 codes labelled, ecoregion fills underneath
  • Post-merge pkgdown CI passes

Notes

This vignette is the template for our three reporting climate-departure appendices and ports directly to fish_passage_peace_reporting_2025. The canonical 16-WSG list is the one to use in the shared GIS project setup going forward.

Fixes #47
Relates to NewGraphEnvironment/sred-2025-2026#23

🤖 Generated with Claude Code

…t to 16

New "Watershed Groups Across Ecoregions" section in the peace-fwcp
vignette: a map of the 16 canonical FWCP Peace watershed groups
labelled with their codes on top of ecoregion fills, plus a table
showing the percent of each watershed group's area that falls in
each of the five ecoregions. Lets readers map per-ecoregion climate
departure findings (precipitation up only in BMP and NRM) onto the
watershed-group reporting unit.

Canonical 16-WSG list hardcoded in data-raw/example_context_fwcp_peace.R:
CARP, CRKD, FINA, FINL, FIRE, FOXR, INGR, LOMI, MESI, NATR, OSPK,
PARA, PARS, PCEA, TOOD, UOMI. Each is >=99% inside the FWCP polygon.
Drops UPCE (only 11.8% inside; main drainage runs east past FWCP) and
MURR (1% sliver). Aligns with the shared GIS project tracking.

Other improvements rolled in:

- Recent vs Pre-warming consolidated to one table (variable, period,
  recent mean, pre-warming mean, abs diff, % change, trend p) instead
  of two near-redundant tables. Plain-language interp paragraph
  states the temperature/VPD/precipitation/SM signals cleanly.
- Spatial Pattern interp paragraph now sits above the map (east-west
  gradient is the dominant signal, smaller south-north component).
- Per-Ecoregion Variation gains a brief interp paragraph above the
  facets (uniform warming, precipitation diverges in the north, VPD
  up in all five).
- Day-night asymmetry headline moved into the section's intro
  paragraph so the reader sees the conclusion before the figures.
- Tightened acronym usage: "AOI" -> "area of interest", "BC" ->
  "British Columbia" in prose. Removed Arctic-draining clarification
  sentence and the dropped-cross-vignette KOTL reference.
- Load-vignette-data chunk now visible so the reader sees how `ts`
  and downstream products materialize from the cache.
- Removed the bottom "A note on reproducibility" section (cache is
  documented in chunk comments).
- All six tables now have single, clean bookdown captions. Fixed the
  kableExtra+bookdown double-caption issue: pass `label = NA` and
  `caption = "..."` to the inner knitr::kable() — `tab.cap` chunk
  option silently drops captions when wrapped in scroll_box.

Closes #47
@NewGraphEnvironment NewGraphEnvironment merged commit 51aa556 into main May 2, 2026
1 check passed
@NewGraphEnvironment NewGraphEnvironment deleted the 47-wsg-ecoregion-overlap branch May 2, 2026 15:56
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.

Vignette: WSG x ecoregion overlap table with curated commentary

1 participant