Skip to content

Commit e706e8b

Browse files
Document v0.2.8 vignette chunk pattern in CLAUDE.md Vignettes section
Captures: hide ggplot/kableExtra boilerplate via echo=FALSE; lift cd recipes into shown eval=FALSE companion chunks; cd:: namespace prefix on every visible call. Reader's flow becomes: cd recipe -> output -> narrative. Pairs with the v0.2.7 bibliography regen note.
1 parent faed284 commit e706e8b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ Both share the same structure (Area of Interest → Trends → Snowpack → Spat
120120

121121
**Bibliography regen.** After adding or removing `[@key]` markers in either vignette, regenerate `vignettes/references.bib` from Zotero/BBT by running `Rscript data-raw/regenerate_bib.R`. Pulls source records via rbbt → BBT, writes the union of keys across both vignettes. Requires Zotero running with BBT enabled (BBT 9.x for Zotero 8/9). CI does not run this — the bib is committed and pkgdown reads the static file.
122122

123+
**Chunk pattern (v0.2.8).** Visible code in both vignettes is dominated by `cd::cd_*()` calls — the package showcase. Boilerplate (ggplot AOI maps, Spatial Pattern map, kableExtra wrappers, facet-plot recipes) is hidden via `echo = FALSE`. Heavy cd recipes (`cd_extract`, `cd_baseline + cd_anomaly + cd_trend + cd_summary`, `cd_compare`, per-ecoregion + per-WSG loops) are lifted into shown `eval = FALSE` companion chunks above the actual data-load chunks (named `<chunk>-recipe` shown / `<chunk>-load` or `<chunk>-table` or `<chunk>-reshape` hidden). Reader sees: cd recipe → output → narrative. Snow plot chunks (`snow-swe-max` etc) stay fully visible since they're already pure cd_*() calls. All cd function calls use `cd::` namespace prefix for explicit package attribution.
124+
123125
The two-vignette template is the foundation for additional regional reporting appendices (cf #47) — port directly to a `fish_passage_<region>_<year>` reporting context.
124126

125127
## Data Directories (gitignored)

0 commit comments

Comments
 (0)