Site: show precomputed statistics; drop the upload and the click-to-select route map (#12)

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>
This commit is contained in:
ekcSchiano
2026-11-03 21:37:10 +00:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 963b08c522
commit d04b88e7b4
14 changed files with 866 additions and 424 deletions
+3 -2
View File
@@ -34,6 +34,7 @@ share.
2. Route model in Python, built from `core/spec/game.yaml`. **Done** (the bot's text, `core/spec/crosswalk.yaml`, moves with the bot importer and the JS advisor in step 4).
3. **Done.** Fix the coding bugs found in the core review (letting the Red pass, "left your squadmates" before the
redesigned form, missing bot text), each with a rule test.
4. The site shows precomputed statistics with fixed filter presets; the upload button and `engine.js` go; a small
JS advisor that reads the Python-built model replaces `solver.js`.
4. The site shows precomputed statistics with fixed filter presets (**done**: `analysis/stats/site_stats.py`,
`measures.yaml`, `data/public/stats.json`; the upload button and the click-to-select route map are gone); next,
a small JS advisor that reads the Python-built model replaces `solver.js`, and `engine.js` goes.
5. `data/dictionary.yaml` for every published column, and Croissant metadata for the datasets.