Dataset flow

How agents publish datasets into Core (datahub.io/core) under the signed Must rules (rules-to-sign.md, rules 1–4). The bar is the machine-checkable Commons dataset standard, enforced by DataPressr's scripts/dataset-check.mjs. (Internal names like "Commons dataset standard" and commons-check mean Core. Entries for datasets others maintain go to datahub.io/commons instead: see projects/datahub-commons/.)

Queue: beads with kind:dataset and a stage:* label (bd list --label kind:dataset), picked from the ideas shortlist. Rate: as many as pass; review 24 Dec.

Steps (one bead per dataset)

  1. Wrangle (Opus agent) into ~/src/datasets/<name>/: tidy CSVs, archive/ with PROVENANCE (licence quoted from the source), scripts/build.mjs, README with ## What stands out, upkeep declared (default frozen), config.json and the check-on-push workflow from DataPressr templates/commons-dataset/, plus FACT.md (excluded from sync) and PACK.md (moved to releases/datasets/<name>/PROMOTION.md before the push, so promotion copy never sits in the public dataset repo).
  2. Gate: node <datapressr>/scripts/dataset-check.mjs <dir> --new --prepublish shows 0 errors. --prepublish confirms datahub.io/core/<name> is 404: the DataHub API does not stop a link from overwriting an existing core dataset.
  3. Fact check (Must rule 2): a second agent, not the wrangler, recomputes the "What stands out" number and every number in PACK.md from the CSVs, and checks the licence quote against the source page. Record reviewer, numbers, command and verdict in the bead. Fix and re-check on any mismatch.
  4. Publish: gh repo create datasets/<name> --public, push main, then dh publish --github datasets/<name> -p core -n <name>. DataHub git-syncs from then on (webhook), reading config.json contentExclude, not .datahubignore.
  5. Verify: dataset-check.mjs <dir> --live passes, and look at the page (README, previews, licence, view). The check-on-push Action is green on GitHub.
  6. Record: a dataset row in publications.csv (venue datahub-core); PACK.md copied to releases/datasets/<name>/PROMOTION.md for the promotion track; bead to stage:published, label review-after, closed.

Fetching

  • Every scripted request (fetch scripts, refresh jobs) sends User-Agent: datahub-commons-refresh/1.0 (+https://github.com/datasets; hello@datahub.io) (Rufus, 28 Nov 2026). Never a person's name or email, never a faked browser UA, no workarounds for blocks. Exception, SEC EDGAR only: send DataHub Research hello@datahub.io (approved by Rufus 20 Nov; SEC returns 403 to the house UA and asks for company name plus email). CDC refuses Node's default node UA but accepts this one. Only the data file should be required in a refresh job: source web pages archived for provenance (licence, data page) can refuse GitHub Actions (Ember returns 403 there), so keep the archived copy when they fail. Archived HTML pages can embed the publisher's API tokens (a BTS page carried a Mapbox token, and GitHub push protection blocked the push): redact them in the archived copy, note it in PROVENANCE, and never bypass push protection.
  • Keyless APIs share one quota per machine: BLS API v2 (a small daily cap) and the Stack Exchange API (300 a day). Don't run two agents on the same API in one day, and fact-check from the archived responses, not by re-fetching.
  • www.bls.gov and download.bls.gov refuse scripted access from this server and from GitHub Actions; only api.bls.gov answers (no occupation-level CFOI there).

Watching the stock

DataPressr's commons-check workflow runs the checker nightly over every repo in github.com/datasets (stock level: only reader-breaking problems are errors). The latest report is reports/latest.md on the DataPressr commons-check branch; the first baseline is in reports/commons-check-2026-11-22.md.

Lessons, 29-30 Nov

  • Check publications.csv for an existing version (e.g. on /datapressr) before picking a candidate; porting to /core beats rebuilding.
  • Derived values (e.g. Q4 = year minus nine months) need build-time checks: no part above its total, no mixed reporting bases. A fact check caught both in bigtech-revenue-segments after the port matched the old data row for row.
  • Read the source's terms of use before any bulk or scripted download. Some publishers forbid automated bulk download, redistribution or commercial reuse (IMF; Bank of England research spreadsheets): those are clearly non-open and go to Rufus, not into the Commons. A wave-10 build fetched IMF data before reading its terms; the copy was deleted.
  • Heuristic flags (e.g. automatic "reporting break" detection) failed three checks; a short hand-checked table with filing references passed. Prefer the table.
Built with LogoFlowershow