hcch / The Beat & Bench

Project review and lessons learned

Feedback from Crime Reporter, Police, Courts, and Judges · Oct 23, 2026
Use the arrow keys or click to move between slides.Swipe or tap the right side for the next slide, the left side to go back.

What got built (Sept 27 – Oct 23)

What Robert did the hard way: all four bots agree

What Robert did the hard way: more

What the bots did wrong

BotOwn mistakes
PoliceThe first street-match rule was buggy and forced a full rerun. QA misses were caught by the reviewer. Maps were redone 3–4 times before the standard was set. Paths were hard-coded. Previews were left only on its own computer.
CourtsRan the bond SQL without saving it to files. Didn't re-ask about fix02c. Reported pairs before people counts. Bond tables had no snapshot design. Never sample-checked the unmatched bond cases.
JudgesQueries weren't saved as files at first. One overlap check was too narrow. Ran a 30-minute full-table test instead of a sample. Keys came late. The roster sat in text rounds before reaching the database.
Crime ReporterLong-winded relays. Drifted into graphics work at the expense of stories (only one full article draft). Kept map scripts only on its own computer.

Was PostgreSQL the right tool?

Unanimous: yes for the finished database and maps, but heavier than needed for the research phase.

Kept

  • Real keys, foreign keys, views
  • PostGIS spatial joins (1.55 million addresses tagged in under 3 minutes)
  • Clean path to a hosted subscriber app

Better split next time

  • DuckDB + Parquet to explore and clean the raw county files (one file, no server, seconds per scan)
  • Postgres/PostGIS only for finished, published tables

Where the database should have lived

Turn these on from day one

ToolWhy
Private GitHub repoEvery SQL file and script is versioned. The Oct 7 rollback and the audit fixes would have had a full history.
Numbered migration filesRebuild the whole database by running the files in order, not just from a dump.
Automated data checks after every loadWould have caught the missing keys, duplicate bond lines, and gaps at the first load instead of in the October audit.
Nightly backup + monthly restore testBackups that don't depend on someone asking, and proof that they actually restore.
Data and source catalogEach table's source link, download date, owner, and caveats in one place.
One shared trackerDecisions and approvals with a status, so nothing gets lost in chat.
Flask/FastAPI + a quick map viewerThe Case Card is built properly instead of patched, and map results get checked by eye before full runs.

What went right (keep these)

Top lessons for the next database project

  1. One hour of planning first: who it's for, what's off-limits, and whether the public data actually has the fields you need.
  2. Set the rules and scope before loading: date range, units, map standard, time limits, and storage location.
  3. Fewer bots: one data owner, one analyst and writer, and one website bot. Write down who owns what.
  4. GitHub, automated checks, backups, and a catalog on day one.
  5. Sample first, then scale. Let approved jobs finish, then review.
  6. Explore in DuckDB, publish in Postgres. Host only when someone will use it live.

Next-project starter checklist

Thank you

All files are in the project folder: