Skip to content

Populate baseline, ship dashboard, add senior poverty#2

Merged
PavelMakarchuk merged 5 commits into
mainfrom
add-senior-poverty
May 12, 2026
Merged

Populate baseline, ship dashboard, add senior poverty#2
PavelMakarchuk merged 5 commits into
mainfrom
add-senior-poverty

Conversation

@PavelMakarchuk
Copy link
Copy Markdown
Contributor

Summary

  • Switch to canonical policyengine.py SPM variable names; populate 2026 baseline for all 52 regions
  • Add PolicyEngine branding, app-v2 styling, and Modal + Vercel deployment
  • Add senior poverty (and deep senior) columns to the state table

Supersedes #1.

Test plan

🤖 Generated with Claude Code

PavelMakarchuk and others added 5 commits May 12, 2026 03:33
Methodology:
- Use spm_unit_is_in_spm_poverty and spm_unit_is_in_deep_spm_poverty
  mapped to person, matching policyengine.py outputs/poverty.py conventions
  (USPovertyType.SPM / SPM_DEEP).
- Formulas are mathematically identical to v1 API's person_in_poverty /
  in_deep_poverty; this only changes the variable name we reference.

Local compute:
- New scripts/compute_local.py runs the same methodology locally without
  Modal, writes data/baseline.json and frontend/public/baseline.json.
- _resolve_dataset falls back to the documented HuggingFace URL convention
  when policyengine.countries import fails (e.g. editable installs with a
  mismatched manifest).

Frontend:
- Pin Next.js to 15.5.4 (16 + Turbopack hits an RSC bundler bug).
- Replace turbopack.root with outputFileTracingRoot.

Baseline (2026, current-law, no reforms):
- All 52 regions populated, zero errors.
- Computed with policyengine 4.3.0 / policyengine-us 1.690.7 /
  policyengine-us-data 1.17.0.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Header bar with the PolicyEngine teal logo on primary-900 background
- Page header strip with title only
- Color palette mirrored from policyengine-app-v2/app/src/app.css
  (primary teal #2C7A7B, bg-secondary #f5f9ff)
- Inter font wired via next/font; favicon copied from app-v2
- Dropped the @policyengine/design-system dependency (tokens are now inlined)
- VersionBar shows absolute timestamps instead of "Nm ago"
- DEPLOYMENT.md + frontend/vercel.json mirror the aspen-eitc-ctc pattern

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The package is only needed for generating the dataset; consumers fetch the
prebuilt HDF5 from HuggingFace at runtime. Modal's image build was failing
because policyengine-us-data isn't published to PyPI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Backend already computes senior rates for every region; surface them in
the state table alongside child and overall poverty.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@PavelMakarchuk PavelMakarchuk merged commit f5a093d into main May 12, 2026
@PavelMakarchuk PavelMakarchuk deleted the add-senior-poverty branch May 12, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant