Entity resolution and householding end to end, small and readable: 858 synthetic messy customer records from four fake source systems, resolved into unified golden records, grouped into mailable households, and enriched with a 3rd-party demographics append — all in the browser, with every merge explained and precision/recall measured against known ground truth.
- Normalize — phones to 10 digits, email validation, nickname canonicalization (Bob → Robert), street-abbreviation standardization, malformed values quarantined.
- Block — candidate pairs only where records share a cheap key (phone, email, ZIP + name prefix, a typo-tolerant sorted-letters name key): ~880 pairs instead of ~295,000.
- Score — weighted field similarities (exact email/phone, nickname-aware Jaro-Winkler names, token-Jaccard addresses), weights renormalized over the fields both records actually have.
- Cluster — union-find over pairs above the threshold; each cluster becomes one golden record via survivorship (most-attested, best-formed value per field).
- Guard — families are the classic trap (shared surname, address, home phone). Two rules keep siblings apart: clearly different full first names cap a pair's score, and a bare initial cannot force a merge without email evidence. Ambiguous records stay unmerged — in production they route to a data-steward queue, not a guess.
- Household — resolved customers at the same normalized address join a household when they share a surname or phone; one mailer per household (858 raw rows -> ~338 mailers).
- Enrich — a synthetic 3rd-party demographics file appends by normalized email/phone; corrupted vendor keys fail closed (quarantined, never force-joined).
- Evaluate — ground-truth entity and household ids ship with the data, so the demo reports real pairwise precision/recall for both, live, as you move the match threshold.
At the default threshold (0.75): 529 unified customers against a ground truth of 504 (identity precision 98.9%, recall 90.2% — the family guards deliberately leave ambiguous records unmerged) and 338 mailable households against a ground truth of 300 (householding precision 100%, recall 86.3%). Drag the slider and watch the precision/recall tradeoff move in real time.
python/make_data.py generates everything (seeded, reproducible): 300 households -> 504 customers, 1–4
records each across CRM / e-commerce / support / in-store, with realistic corruption — nicknames,
typos, format drift, case damage, initials, missing fields, and a sprinkle of invalid emails and
truncated phone numbers for the data-quality profile. No real people anywhere.
python python/make_data.py # regenerate web/data.json
cd web && python -m http.server # open http://localhost:8000No dependencies beyond the Python standard library and a browser; the web app is vanilla ES modules.
A teaching demo, not a product: classic deterministic + probabilistic matching on a small synthetic dataset. Production identity resolution deals with orders of magnitude more scale, streaming updates, householding, and messier reality than a generator can fake.
Built by James Belanger. Related: Hospital Quality Explorer · Pronunciation Coach. MIT license.