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
This commit is contained in:
ekcSchiano
2026-11-04 02:46:48 +00:00
co-authored by Claude Opus 5.5
parent 61bc50583c
commit 3b24a11f5a
64 changed files with 8626 additions and 6909 deletions
+50 -15
View File
@@ -67,13 +67,23 @@
"isBasedOn": [
{
"@type": "sc:CreativeWork",
"name": "Threshing Routes form responses (u/ClumsyBadger)",
"name": "Threshing Routes form and spreadsheet (u/ClumsyBadger, linked from the r/fourthwing megathreads)",
"url": "https://docs.google.com/spreadsheets/d/1gnw1AdRg1XT4JsOfRM6QTA0jSaS3n9ZF-rPWnYewzv0"
},
{
"@type": "sc:CreativeWork",
"name": "Unofficial Dragon Register responses",
"name": "Unofficial Dragon Register (which dragon each rider bonded)",
"url": "https://docs.google.com/spreadsheets/d/1KMiE9sec0l597Pzue1OhGYf07NF4howtQ_lPeqx7jXQ"
},
{
"@type": "sc:CreativeWork",
"name": "Runs posted in the r/fourthwing Dragonkind megathreads",
"url": "https://www.reddit.com/r/fourthwing/comments/1wvwfp9/"
},
{
"@type": "sc:CreativeWork",
"name": "Runs reported on the Atlas (\"Report a run\", a GitHub issue form)",
"url": "https://github.com/ekcSchiano/threshing-atlas/issues/new?template=report-a-run.yml"
}
],
"distribution": [
@@ -81,11 +91,11 @@
"@type": "cr:FileObject",
"@id": "runs_clean",
"name": "runs_clean",
"description": "One coded run per row of the community form (core/atlas/coding.py, rules in core/spec/form.yaml).",
"description": "Every run from every source, one per row, coded into the same columns (collection/etl/runs.py; the form's rules are core/spec/form.yaml). The `source` column says where each run came from.",
"contentUrl": "https://ekcschiano.github.io/threshing-atlas/data/runs_clean.csv",
"encodingFormat": "text/csv",
"sha256": "ef34b36881b6bc0f57453e425b1c7d76155e6572463aff0d7e89b9857823f7db",
"contentSize": "1991643 B"
"sha256": "766d8708dad77327534063df42cd4ff806ab707497618ab5263cf3dce98a30c7",
"contentSize": "2146368 B"
},
{
"@type": "cr:FileObject",
@@ -97,6 +107,16 @@
"sha256": "4c5791f78ce81f5e88f1fb99d933acd06d8223ff9a573e96b6fcb3a6fd9c8d22",
"contentSize": "8293395 B"
},
{
"@type": "cr:FileObject",
"@id": "reports",
"name": "reports",
"description": "Runs reported through the Atlas's \"Report a run\" form (GitHub issues), answers only, no usernames.",
"contentUrl": "https://github.com/ekcSchiano/threshing-atlas/blob/main/data/public/reports.json",
"encodingFormat": "application/json",
"sha256": "d42eb04b9923eb1d2a8e5c356452f52daab78293be5a29a448cfb69c974eab30",
"contentSize": "92 B"
},
{
"@type": "cr:FileObject",
"@id": "register",
@@ -114,8 +134,8 @@
"description": "Every number the Atlas page shows, for six filter presets (analysis/stats/site_stats.py; what is measured is analysis/stats/measures.yaml).",
"contentUrl": "https://ekcschiano.github.io/threshing-atlas/data/stats.json",
"encodingFormat": "application/json",
"sha256": "d48b1da5176d6e85f6ee093cfb4f50dfbc6f71cfa7fec8ecb49a7c32c14f6d53",
"contentSize": "4269825 B"
"sha256": "dc79c0762e5c27423f9fa2086f06aa7019b0aec6ae41d6a6dcbe59a1016cffab",
"contentSize": "4269546 B"
},
{
"@type": "cr:FileObject",
@@ -131,11 +151,11 @@
"@type": "cr:FileObject",
"@id": "graph",
"name": "graph",
"description": "The route graph over every source (form and bot), counted per source (analysis/network/build-graph.js).",
"description": "The route graph over every run in runs_clean.csv, counted per source (analysis/network/build-graph.js).",
"contentUrl": "https://ekcschiano.github.io/threshing-atlas/data/graph.json",
"encodingFormat": "application/json",
"sha256": "043227ff7d858fa8e73e7447f4cd7171bb216ab8d203b036df056d8ed542e446",
"contentSize": "48634 B"
"sha256": "72ef6fa6d6edc3a53026eff3f9cf39a883f7a709eacaaf21351c9ca1251a986a",
"contentSize": "48783 B"
}
],
"recordSet": [
@@ -143,7 +163,7 @@
"@type": "cr:RecordSet",
"@id": "runs",
"name": "runs",
"description": "One coded threshing run per row (data/derived/runs_clean.csv).",
"description": "One coded threshing run per row, from every source (data/public/runs_clean.csv).",
"key": {
"@id": "runs/run_id"
},
@@ -152,8 +172,8 @@
"@type": "cr:Field",
"@id": "runs/run_id",
"name": "run_id",
"description": "Row number in the form export (1 = first row).",
"dataType": "sc:Integer",
"description": "Unique id of the run: sheet-<row of the form export>, thread-<result id>, reported-<issue number> or bot-<hash>.",
"dataType": "sc:Text",
"source": {
"fileObject": {
"@id": "runs_clean"
@@ -167,7 +187,7 @@
"@type": "cr:Field",
"@id": "runs/source",
"name": "source",
"description": "\"Form\" for a form submission (it has a timestamp). Bulk-pasted logs keep the label they were pasted with; they record every run of the players who kept them, so they are the least selectively reported rows. Values: Form; Data Import; BulkUpload3; Manual Upload; Historical import; Unknown import.",
"description": "Where the run came from. \"reddit spreadsheet\": the community Threshing Routes form and spreadsheet linked from the r/fourthwing megathreads. \"reddit thread\": a dragonkind.com result page posted in a megathread (bonded, route not recorded). \"reported\": the Atlas's own \"Report a run\" form. \"bot\": an attempt logged by the DragonKind bot. \"reddit pdf\": the community route PDF (a flowchart of the routes, not a log of runs, so it adds no rows today). Values: reddit spreadsheet; reddit thread; reported; bot; reddit pdf.",
"dataType": "sc:Text",
"source": {
"fileObject": {
@@ -178,11 +198,26 @@
}
}
},
{
"@type": "cr:Field",
"@id": "runs/entry",
"name": "entry",
"description": "For spreadsheet runs, the sheet's own row label: \"Form\" for a form submission (it has a timestamp); bulk-pasted logs keep the label they were pasted with. Bulk logs record every run of the players who kept them, so they are the least selectively reported rows. Empty for other sources. Values: Form; Data Import; BulkUpload3; Manual Upload; Historical import; Unknown import.",
"dataType": "sc:Text",
"source": {
"fileObject": {
"@id": "runs_clean"
},
"extract": {
"column": "entry"
}
}
},
{
"@type": "cr:Field",
"@id": "runs/date",
"name": "date",
"description": "Date of a form submission (YYYY-MM-DD). Empty for bulk-pasted rows.",
"description": "Date of the run or its report (YYYY-MM-DD): the form submission, the issue, or the bot attempt. Empty for bulk-pasted rows and result pages.",
"dataType": "sc:Date",
"source": {
"fileObject": {