Step 4a of the Python-first core. - analysis/stats/measures.yaml (declarative): outcomes and denominators, route targets and comparison groups, encounter contexts, the route map's stages, six filter presets and the route thresholds (5, 10, 20, 30). - analysis/stats/site_stats.py computes every number the page shows, for every preset, and writes data/public/stats.json: factor tables, models, chance events, encounters, the route map for every outcome, route rankings with q-values at every threshold, the valley map's place and step counts, and The Odds' summary cards. - The page now only displays: app.js, ui.js and explorer.js read stats.json; engine.js is no longer loaded. The three filter controls become one "Runs" menu; minimum runs become fixed thresholds. Removed: "Load a newer route export", click-to-select and "Follow" on the Deep Dive route map, and the unused old valley renderer. The coded runs are a CSV download. - tests/parity/compare_stats.py: every number matches what engine.js computed, for all six presets (factor tables, models, encounters, route rankings at every threshold, route map). Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
12 lines
1.2 KiB
Markdown
12 lines
1.2 KiB
Markdown
# analysis
|
||
|
||
Making sense of the data.
|
||
|
||
| Folder | What it does |
|
||
|---|---|
|
||
| `stats/measures.yaml` | **Declarative.** What the site measures: outcomes and their denominators, route targets and comparison groups, the bonding-encounter contexts, the route map's stages, the filter presets and the route thresholds. |
|
||
| `stats/site_stats.py` | Computes every number the Atlas page shows for every preset and writes `data/public/stats.json`; the page computes nothing itself. `tests/parity/compare_stats.py` checks it against the old in-browser engine until that is removed. |
|
||
| `stats/` | General statistics in Python (`analyze.py`, `stats_core.py`): rates with Wilson intervals, odds ratios with Fisher's test and Benjamini–Hochberg, ridge logistic models that adjust for data source and chase goal. `core/engine.js` computes the same numbers for the site, and `tests/parity/` checks they match. |
|
||
| `network/` | `build-graph.js` combines every source into `data/public/graph.json` (the decision-variable graph and the bot's scene graph). CI fails if the committed graph is out of date. |
|
||
| `reports/` | Generated reports. `POLICY.md` is written by `planner/policy_report.py`; do not edit it by hand. |
|