Files
threshing-atlas/analysis/stats/measures.yaml
T
ekcSchianoandClaude Opus 5.5 3b24a11f5a Collection as an ETL pipeline; runs_clean.csv from every source; Report a run
- collection/pipeline.yaml declares every source (extract kind, transform,
  privacy rules, load target, run source); `python -m collection update|build`
- extract keeps data/raw/<source>/current + previous only (git-ignored);
  data/manifest.json records the current raw checksum and change date
- transforms are pure; validate checks runs against data/dictionary.yaml
  before load; load writes byte-stable files only when they change
- data/public/runs_clean.csv: every run from every source with a new
  `source` column (reddit spreadsheet, reddit thread, reported, bot,
  reddit pdf); the sheet's own row label moves to `entry`; run_id is text
- bot importer ported to Python (same output as bot.js on the fixture);
  labels and crosswalk in collection/specs/bot.yaml, written into graph.js
- Reddit through the official API (result links to add by hand); the 12
  result pages move to collection/manual/reddit_results.yaml
- "Report a run": a GitHub issue form generated from
  collection/specs/report_form.yaml, collected as source "reported", plus a
  site tab pointing to it, the community spreadsheet and the megathread
- analysis and the route model read runs_clean.csv (sources in
  measures.yaml); stats.json and policy.json unchanged apart from the
  factor's new name
- daily workflow runs the pipeline; the raw store is kept between runs in
  the Actions cache, encrypted with RAW_ARCHIVE_KEY

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ
2026-11-04 02:46:48 +00:00

91 lines
5.9 KiB
YAML

# What the site measures: outcomes and their denominators, route targets and their comparison groups, the
# bonding-encounter contexts, the stages of the route map, the filter presets and the minimum-run thresholds.
# analysis/stats/site_stats.py reads this file and writes data/public/stats.json, which the page only displays.
#
# Conditions: {field: value} means equal; {field: {in: [...]}}, {field: {not: value}}, {field: {exists: true}}
# (not blank), {any: [condition, ...]} (at least one). Several fields in one condition must all hold.
version: 1
# Which runs of data/public/runs_clean.csv the statistics use (its `source` column). Runs from the other sources
# (reported, bot, Reddit result pages) are in the published file but not in these statistics yet: they are coded
# from different questions, and the bot follows a strategy, so pooling them needs its own review.
sources: [reddit spreadsheet]
colours: [Red, Green, Orange, Brown, Blue, Black]
# Outcomes for the factor tables and models: who could have had the outcome (denom), and the outcome (event).
outcomes:
blue_meadow:
label: Blue appears in the meadow
denom: { branch: "Passed the Red: meadow" }
event: { saw_blue_meadow: true }
shadow:
label: Shadow option appears at the tree
denom: { hour: Tree, branch: { exists: true } }
event: { saw_shadow: true }
bond_blue_meadow:
label: Bond, given you approached the meadow Blue
denom: { branch: "Passed the Red: meadow", enc_Blue: { in: ["Bonded!", "Incinerated"] } }
event: { enc_Blue: "Bonded!" }
reach_hour:
label: Survive to the hour (tree/valley choice)
denom: {}
event: { hour: { in: [Tree, Valley] } }
# one more outcome per colour: "Run ends bonded to <colour>", among runs that reached the hour
bonded_outcome:
label: Run ends bonded to {colour}
denom: { hour: { in: [Tree, Valley] } }
event: { outcome: Bonded, outcome_color: "{colour}" }
# Factors compared in the factor tables (each answer against the other answers to the same question)
factors: [company, direction, first_sighting, scream, resolution, combat_first, post_path, hour, wing, squad,
attempt_group, entry, goal, sighting_action, combat_second, malek_intent]
# Route targets: the outcome (event) and which runs could have reached it at all (pool)
targets:
bond_Blue: { label: Bond Blue, colour: Blue, event: { outcome: Bonded, outcome_color: Blue }, pool: { hour: Valley } }
bond_Black: { label: Bond Black, colour: Black, event: { outcome: Bonded, outcome_color: Black }, pool: { hour: Tree } }
see_Blue: { label: Meet a Blue (meadow), colour: Blue, event: { saw_blue_meadow: true }, pool: { branch: "Passed the Red: meadow" } }
see_shadow: { label: Get the tree shadow, colour: Black, event: { saw_shadow: true }, pool: { hour: Tree, branch: { exists: true } } }
bond_Red: { label: Bond Red, colour: Red, event: { outcome: Bonded, outcome_color: Red }, pool: { hour: { in: [Tree, Valley] } } }
bond_Green: { label: Bond Green, colour: Green, event: { outcome: Bonded, outcome_color: Green }, pool: { hour: Tree } }
bond_Orange: { label: Bond Orange, colour: Orange, event: { outcome: Bonded, outcome_color: Orange }, pool: { hour: { in: [Tree, Valley] } } }
bond_Brown: { label: Bond Brown, colour: Brown, event: { outcome: Bonded, outcome_color: Brown }, pool: { hour: { in: [Tree, Valley] } } }
bond_any: { label: Bond any dragon, colour: null, event: { outcome: Bonded }, pool: { hour: { in: [Tree, Valley] } } }
# Bonding encounters: which recorded attempt (column) belongs to which in-game encounter (where)
encounters:
- { context: "Red (tree, descend quickly)", colour: Red, column: enc_Red, where: { hour: Tree, branch: "Descend quickly: Red" } }
- { context: "Green (two Greens)", colour: Green, column: enc_Green, where: { hour: Tree, any: [ { branch: "Descend slowly: two Greens" }, { branch: "Descend quickly: let the Red pass" } ] } }
- { context: "Blue (shadow)", colour: Blue, column: enc_Blue, where: { hour: Tree, branch: "Shadow (rare)" } }
- { context: "Black (shadow)", colour: Black, column: enc_Black, where: { hour: Tree, branch: "Shadow (rare)" } }
- { context: "Red (valley)", colour: Red, column: enc_Red, where: { hour: Valley, branch: Valley Red } }
- { context: "Orange (meadow)", colour: Orange, column: enc_Orange, where: { hour: Valley, branch: "Passed the Red: meadow" } }
- { context: "Brown (meadow)", colour: Brown, column: enc_Brown, where: { hour: Valley, branch: "Passed the Red: meadow" } }
- { context: "Blue (meadow)", colour: Blue, column: enc_Blue, where: { hour: Valley, branch: "Passed the Red: meadow" } }
# The route map's columns, in order. "chance": steps the game rolls, not the rider.
stages:
- { key: company, label: Company }
- { key: direction, label: Direction }
- { key: first_sighting, label: First sighting, chance: true }
- { key: cadet, label: Cadet encounter }
- { key: post_path, label: Fork in the road }
- { key: hour, label: After an hour }
- { key: encounter, label: Encounter, chance: true }
- { key: end, label: Outcome }
# Filter presets: the page shows one at a time (no statistics are computed in the browser)
presets:
all: { label: All runs, filters: { source: all, goal: all, excludeFlagged: false } }
form: { label: Form submissions only, filters: { source: form, goal: all, excludeFlagged: false } }
bulk: { label: Bulk logs only (imports), filters: { source: bulk, goal: all, excludeFlagged: false } }
not_chasing: { label: Not chasing Blue/Black, filters: { source: all, goal: exclude_rare, excludeFlagged: false } }
chasing: { label: Chasing Blue/Black, filters: { source: all, goal: only_rare, excludeFlagged: false } }
unflagged: { label: Rows without data-quality flags, filters: { source: all, goal: all, excludeFlagged: true } }
# Minimum runs a full route needs before it is ranked (q-values are corrected within each threshold)
route_thresholds: [5, 10, 20, 30]
rare_goals: [Blue, Black, Blue or Black]