feat: Migrant Life-Map MVP — multi-country life expectancy + life-context modifiers (#27)#39
Merged
glebis merged 16 commits intoMay 31, 2026
Conversation
Continuation of #27: user-selectable demographic that swaps demographic-keyed mortality data, plus life-expectancy/HALE data layer to unblock the future life-calendar visual. Project A of a 3-part decomposition (data / visuals / share). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Standalone #/life-map view: blends multiple countries' life expectancy (Eurostat EU + WHO Russia) as side-by-side anchors plus a clearly-labeled heuristic migration marker, with qualitative stress/mental-health/family modifiers (evidence-gated, no scary numbers). Real data via reproducible fetch script -> committed versioned file. Design consulted with Codex; both agreed on standalone view, anchors-primary blend, deferred genetic overlay. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rse data) (#27) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ata (#27) 31 countries (broad EU via Eurostat single-year ages + Russia via WHO sparse brackets), version-stamped with per-country source, committed to config/. Pure parsers unit-tested against recorded fixtures; live fetch under __main__. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…difiers config (#27) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…, wired into nav (#27) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Qualitative by default; opt-in caveated range only for strong-evidence factors; mental-health items can never produce a number. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tic blend, qualitative modifiers only (#27) Never exports opt-in year ranges; labels blend a heuristic not a prediction. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…port bar (#27) SVG axis shows each country anchor + heuristic blend band; LifeMapGlyph is a deterministic migration-journey glyph (not GenomeGlyph); HeroHeader gains an optional icon slot. Codex-consulted redesign. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…talogue (#27) Factors are now opt-in toggles persisted per user; only chosen factors render detail cards and appear in export. Removes the false personalization where every user saw 'Diagnosed anxiety disorder' etc. regardless. Evidence gating preserved. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Fix phantom `--text-primary` -> `--text` (axis labels were rendering pure black) - Drop redundant fallbacks for tokens that exist (--border-strong/-dashed, --sig-monitor) - Use --primary-strong for 'CURRENT' tag + selected chips (AA contrast on inset bg) Addresses audit M1, M2 (feature-local), L3. Token-only; no behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… a11y semantics (#27) - useLifeMap: surface fetch errors + reload(); LifeMap shows retry on failure (H1 audit) - Residence rows wrap on mobile; long country names wrap; 44px touch targets on inputs/chips/radio/remove (H1/H2) - HeroHeader title is now an <h1> (one heading per view, fixes hierarchy across sections; M3) - LifeExpectancyAxis aria-label exposes per-country values + heuristic blend to SR (M4) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace inline chip styles with a .lifemap-chip class: hover/active/focus-visible states, transitions (registered for prefers-reduced-motion), selected styling via aria-pressed. Matches the app's .btn state system. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrant Life-Map MVP (#27, track A2+F)
A standalone
#/life-mapview that blends multiple countries' life expectancy for migrants, using real, citable data — not arithmetic guesses.What it does
Data
scripts/fetch_life_expectancy.py) pulls Eurostatdemo_mlexpec(31 EU countries, single-year ages) + WHO GHO (Russia, sparse brackets) into a committed, version-stampedconfig/life_tables.json. Pure parsers are unit-tested against recorded fixtures; live fetch only under__main__.Honesty guardrails
Tests (TDD throughout)
lib/lifeBlend(9),useResidenceHistory+useLifeMap(8),LifeMap(4),LifeModifiers(4) — frontend 550 passed.Decisions
Design consulted with Codex; both agreed on the standalone view, anchors-primary blend, and deferring the genetic overlay. Specs + plan included under
docs/superpowers/.Deferred (separate tracks)
Life-calendar/timeline visuals (B), CLI/MCP shareable social cards (C), genetic-correlation overlay, functional self-tests (E).
🤖 Generated with Claude Code