Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
fdf8b8d
Model 2027 coverage and the extension scenarios in the calculator API
DTrim99 Nov 8, 2026
5471149
Pin policyengine-us 2.115.0, with the 2027 premiums and the minimum p…
DTrim99 Nov 9, 2026
30c4374
Default the calculator to 2027 and add the new scenarios
DTrim99 Nov 7, 2026
0eec0e9
Say so when the server answers for another year
DTrim99 Nov 7, 2026
b4fcebc
Offer the $5 minimum premium scenario
DTrim99 Nov 9, 2026
3b24fe0
Move the Overview and Explore pages to 2027 and read their figures fr…
DTrim99 Nov 8, 2026
f6fdf38
Regenerate the Overview and Explore data with policyengine-us 2.105.0
DTrim99 Nov 8, 2026
a72286c
Regenerate the Overview and Explore data with policyengine-us 2.115.0
DTrim99 Nov 9, 2026
51f53bb
Drop the draft scenarios and return 2026 current law alongside 2027
DTrim99 Nov 9, 2026
98470de
Merge remote-tracking branch 'origin/aca-2027-backend' into aca-2027-…
DTrim99 Nov 9, 2026
5d7a10d
Merge remote-tracking branch 'origin/main' into aca-2027-backend
DTrim99 Nov 9, 2026
d31c431
Compare 2026 and 2027 current law with H.R. 1834 in the calculator
DTrim99 Nov 9, 2026
0c045bd
Merge remote-tracking branch 'origin/aca-2027-backend' into aca-2027-…
DTrim99 Nov 9, 2026
f81c9ce
Precompute the story's households: 2026 and 2027 current law and H.R.…
DTrim99 Nov 9, 2026
6a417ed
Merge remote-tracking branch 'origin/aca-2027-calculator' into aca-20…
DTrim99 Nov 9, 2026
92e7f69
Label the premium chart's axis "Per month"
DTrim99 Nov 9, 2026
fb7bbb6
Let a preview of the API run beside the live app
DTrim99 Nov 11, 2026
b00da61
Precompute the national effects of H.R. 1834 in 2027
DTrim99 Nov 11, 2026
f999f17
Tell the 2027 story on one Overview page
DTrim99 Nov 11, 2026
1f4fd63
Merge remote-tracking branch 'origin/aca-2027-backend' into aca-2027-…
DTrim99 Nov 11, 2026
b60bac8
Merge remote-tracking branch 'origin/aca-2027-calculator' into aca-20…
DTrim99 Nov 11, 2026
a0dd3a7
Pin policyengine-us 2.138.2 and read the credit from household net in…
DTrim99 Nov 16, 2026
d7a6890
Rerun the example households and contribution schedules on policyengi…
DTrim99 Nov 16, 2026
a76fdc6
Make the Overview a single scrolling story and add the H.R. 1834 chec…
DTrim99 Nov 16, 2026
d7301f2
Rerun the national estimates on policyengine-us 2.138.2
DTrim99 Nov 16, 2026
b13cc27
Put the 1st decile at the bottom of the winners and losers chart
DTrim99 Nov 16, 2026
2c65cc2
Label the poverty and inequality bars at their ends
DTrim99 Nov 16, 2026
908a13e
Bold the average rise in benchmark premiums, not the 2027 level
DTrim99 Nov 16, 2026
b585ae3
Move the H.R. 1834 checkbox into the household form
DTrim99 Nov 16, 2026
35c0323
Show the Pennsylvania example's marginal tax rate with and without th…
DTrim99 Nov 16, 2026
a4b3870
Stack the calculator top to bottom and store the Overview's four hous…
DTrim99 Nov 16, 2026
1b47789
Add direct labels, a section rail, fade-ins, count-up figures and a d…
DTrim99 Nov 16, 2026
86c5c26
Limit take-up above 400% FPL to reported individual coverage and show…
DTrim99 Nov 16, 2026
159bbef
Add a Methodology tab
DTrim99 Nov 16, 2026
72b7e03
Restore the pill-shaped page tabs
DTrim99 Nov 17, 2026
2e29ec8
Brighten the Overview and open it with the background
DTrim99 Nov 17, 2026
9dd36a3
Keep the Overview's opening paragraph neutral
DTrim99 Nov 17, 2026
43c982a
Remove the teal bar beside the section being read
DTrim99 Nov 17, 2026
ffef990
Use David's wording for the Overview's opening paragraph
DTrim99 Nov 17, 2026
10dbb87
Address Max's step 2 review items on the calculator and household story
DTrim99 Nov 17, 2026
d99089f
Hold the national figures off the page until they're validated
DTrim99 Nov 17, 2026
24d0a64
Return the Overview to the split view and drop its section rail
DTrim99 Nov 17, 2026
6b82b8f
Tell the Overview in the deployed app's order, around the 2027 increase
DTrim99 Nov 17, 2026
48c455d
Show the 2027 increase for two incomes, below and above 400% FPL
DTrim99 Nov 17, 2026
6991628
Plain white header, with the title and tabs aligned left
DTrim99 Nov 17, 2026
514eb79
Use the Texas and Pennsylvania adults as the two examples
DTrim99 Nov 17, 2026
2e90cd7
Match the text's dollar changes to the table, and say "receives"
DTrim99 Nov 17, 2026
2896c79
Make the tables add up after rounding, and cache only answers for the…
DTrim99 Nov 18, 2026
e0edff1
Keep the calculator's cards from blending incomes across eligibility …
DTrim99 Nov 18, 2026
4d97f8e
Apply Pavel's review: below 100% FPL, naming, notes, chart labels
DTrim99 Nov 19, 2026
9abf024
Coverage gap wording, "reviving", Share results and deep links
DTrim99 Nov 19, 2026
8599bb3
Say "most non-expansion states" for the coverage gap
DTrim99 Nov 19, 2026
a882306
Calculate the "Your household" cards at the earnings entered
DTrim99 Nov 20, 2026
6385824
Store the examples' answers at their earnings, from the preview API
DTrim99 Nov 20, 2026
0ad1f4e
Center the Overview's chart, keep line names off the lines, use a spi…
DTrim99 Nov 23, 2026
95df99e
Make the Overview's pinned chart larger and match the text cards
DTrim99 Nov 23, 2026
c13329b
Remove the calculator's "Explain with AI" button
DTrim99 Nov 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/modal-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ on:
- modal-requirements.txt
- aca_calc/**
- src/aca_api/**
- tests/test_api_at_income.py
- tests/test_api_explain.py
- tests/test_api_scenarios.py
- tests/test_enhanced_ptc_reform.py
- tests/test_modal_requirements.py
- tests/test_smoke_test_api.py
Expand All @@ -23,7 +25,9 @@ on:
- modal-requirements.txt
- aca_calc/**
- src/aca_api/**
- tests/test_api_at_income.py
- tests/test_api_explain.py
- tests/test_api_scenarios.py
- tests/test_enhanced_ptc_reform.py
- tests/test_modal_requirements.py
- tests/test_smoke_test_api.py
Expand Down Expand Up @@ -63,7 +67,7 @@ jobs:
uv venv --python 3.11
uv pip install -r modal-requirements.txt
- name: Run the API tests
run: .venv/bin/python -m pytest tests/test_api_explain.py tests/test_enhanced_ptc_reform.py tests/test_modal_requirements.py tests/test_smoke_test_api.py
run: .venv/bin/python -m pytest tests/test_api_at_income.py tests/test_api_explain.py tests/test_api_scenarios.py tests/test_enhanced_ptc_reform.py tests/test_modal_requirements.py tests/test_smoke_test_api.py

deploy:
name: Deploy and smoke-test
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ Thumbs.db
# Logs
*.log

# Data/cache
data/
# Data/cache (the root's data/ only: src/data/ holds the site's precomputed results)
/data/
.cache/

# Node.js / React
Expand Down
49 changes: 30 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
# ACA Premium Tax Credit Calculator

Compare 2026 Premium Tax Credits with and without Inflation Reduction Act (IRA) enhancements.
How ACA marketplace premiums change from 2026 to 2027 under current law, and what reviving the enhanced premium tax credits (H.R. 1834) would do for households.

**🔗 [Try the Calculator](https://policyengine.org/us/aca-calc)**

## Overview

The Inflation Reduction Act enhanced ACA subsidies through 2025. This calculator shows what your credits would be in 2026 with and without extending these enhancements.
The American Rescue Plan Act enhanced ACA premium tax credits for 2021 and 2022, and the Inflation Reduction Act extended them through 2025. They expired after 2025, so 2026 and 2027 coverage follows the original ACA schedule. H.R. 1834, which passed the House on January 8, 2026 and has not been enacted, would revive them for 2026 through 2028.

The app has three pages:
- **Overview**: how benchmark premiums rise in 2027, who pays the increase under current law, and what H.R. 1834 would mean for four example households.
- **Calculator**: what a household would pay for its benchmark plan, and its credit, in 2026 and 2027 under current law and in 2027 under H.R. 1834.
- **Methodology**: the model and data, the policies compared, and the limitations.

**Key Differences:**
- **With IRA Extension**: No income cap, lower premium contributions (0-8.5% of income)
- **After IRA Expires**: 400% FPL cap ("subsidy cliff"), higher contributions (2-9.5% of income)
- **Enhanced credits (2021–2025)**: No income cap; required contributions from 0% to 8.5% of income
- **Current law (2026 on)**: No credit above 400% FPL (the "subsidy cliff"); required contributions from about 2% to 10% of income, set each year by the IRS

## Quick Start

Expand All @@ -36,19 +41,10 @@ uv run --with fastapi --with uvicorn uvicorn src.aca_api.api:app --port 5001

- ✅ **All 50 States + DC**: Accurate calculations for every jurisdiction
- ✅ **3,143 Counties**: County-specific marketplace pricing
- ✅ **Real-time Comparison**: Side-by-side baseline vs. IRA extension
- ✅ **Real-time Comparison**: 2026 and 2027 current law against H.R. 1834
- ✅ **Interactive Charts**: See how credits change across income levels
- ✅ **Household Flexibility**: Single, married, with/without dependents

## Example Results

| Scenario | Income | Baseline PTC | With IRA | Savings |
|----------|--------|--------------|----------|---------|
| NJ Family of 3 | $50,000 | $8,515 | $10,626 | $2,111/year |
| TX Couple (Travis) | $60,000 | $6,974 | $9,195 | $2,221/year |
| CA Couple + Child | $75,000 | $12,913 | $15,695 | $2,782/year |
| NY Single @ 400% FPL | $62,280 | $0 | $2,899 | $2,899/year |

## Technical Details

Built with:
Expand All @@ -64,14 +60,14 @@ County data sourced from PolicyEngine's ACA rating areas database.
.
├── app/ # Next.js entry (layout and page)
├── src/
│ ├── App.jsx # The Overview, Explore Households and Calculator pages
│ ├── App.jsx # The Overview and Calculator pages
│ ├── components/ # Charts, tables and the calculator
│ ├── data/households/ # Precomputed results the Overview and Explore pages read
│ ├── data/ # Precomputed results the Overview reads
│ └── aca_api/ # The FastAPI backend (api.py, models.py)
├── aca_calc/calculations/ # The household builder and the scenarios' reforms
├── modal_app.py # The API's Modal deployment
├── modal-requirements.txt # The API image's exact package versions
├── precompute_*.py # Regenerate the precomputed household results
├── precompute_*.py # Regenerate the precomputed results (see below)
├── scripts/ # The post-deploy smoke test
├── counties.json # County lists for the calculator form
├── process_counties.py # Regenerates counties.json
Expand All @@ -82,7 +78,7 @@ County data sourced from PolicyEngine's ACA rating areas database.
## Development

The optional `/api/explain` endpoint uses `claude-sonnet-5-5` with low effort
and requires `ANTHROPIC_API_KEY`. Run its regression tests without provider
and requires `ANTHROPIC_API_KEY`. The calculator page doesn't call it. Run its regression tests without provider
credentials or network calls (FastAPI is installed separately in deployment):

```bash
Expand All @@ -98,6 +94,20 @@ make test
python process_counties.py
```

## Precomputed results

The Overview reads results computed ahead of time with the API's pinned
policyengine-us. Rerun the scripts after every pin:

- `precompute_contribution_schedules.py`: the share of income each schedule
charges for the benchmark plan
- `precompute_cliff_household.py`: the Pennsylvania example across incomes
- `precompute_households.py`: four example households at one income each
- `precompute_national.py`: the national effects of H.R. 1834 in 2027, over
policyengine-us's default microdata. It needs about 32 GB of memory, so run
it on Modal or another large machine. The Overview doesn't show these
figures until they are validated against administrative data.

## Deploying the API

The calculator page calls a FastAPI backend on Modal: app `aca-calc-api` in
Expand All @@ -106,7 +116,8 @@ the `main` environment of PolicyEngine's Modal workspace, defined in
runs the API tests against the image's pinned packages on pull requests that
touch the backend. When such a change merges to `main`, it deploys the app and
smoke-tests `/api/health`, both calculator endpoints (`/api/calculate-stream`,
which the page calls, and `/api/calculate`, its fallback) and `/api/explain`.
which the page calls, and `/api/calculate`, its fallback), `/api/calculate-at-income`
(the "Your household" tab's answer at the earnings entered) and `/api/explain`.
The calculator checks set `skip_cache`, which makes both endpoints compute a
new answer without reading or writing the 7-day cache, and the stream check
confirms that the new code computed its answer. Modal can keep sending
Expand Down
9 changes: 8 additions & 1 deletion aca_calc/calculations/household.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ def build_household_situation(
"spm_units": {"your household": {"members": ["you"]}},
"tax_units": {"your tax unit": {"members": ["you"]}},
"households": {
"your household": {"members": ["you"], "state_name": {year: state}}
"your household": {
"members": ["you"],
# The credit measures income against the prior year's poverty
# guideline (aca_magi_fraction), so the state is set for that
# year too. Without it, Alaska and Hawaii households get the
# 48 states' lower guideline.
"state_name": {year - 1: state, year: state},
}
},
}

Expand Down
44 changes: 28 additions & 16 deletions aca_calc/calculations/reforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,41 @@
ENHANCED_INITIAL = [0, 0, 0.02, 0.04, 0.06]
ENHANCED_FINAL = [0, 0.02, 0.04, 0.06, 0.085]

ENHANCED_PERIOD = "2026-01-01.2100-12-31"
# H.R. 1834 revives the enhanced schedule for 2026 through 2028.
ENHANCED_PERIOD = "2026-01-01.2028-12-31"


def _enhanced_schedule() -> dict:
"""The enhanced schedule as policyengine-us parameter overrides.

The three lists are replaced together: the threshold list has one more
entry than the rate lists, and current law's lists have a 133% FPL
threshold the enhanced schedule doesn't.
"""
return {
"gov.aca.required_contribution_percentage.threshold": {ENHANCED_PERIOD: ENHANCED_THRESHOLDS},
"gov.aca.required_contribution_percentage.initial": {ENHANCED_PERIOD: ENHANCED_INITIAL},
"gov.aca.required_contribution_percentage.final": {ENHANCED_PERIOD: ENHANCED_FINAL},
}


# gov.aca.ptc_income_eligibility's third bracket starts at 400% FPL; from 2026
# it makes incomes there ineligible.
NO_INCOME_CAP = {"gov.aca.ptc_income_eligibility[2].amount": {ENHANCED_PERIOD: True}}


def create_enhanced_ptc_reform():
"""Create reform extending enhanced PTCs (IRA extension) from 2026 on.
"""H.R. 1834: revive the enhanced premium tax credits for 2026-2028.

Restores the ARPA/IRA applicable-percentage schedule and removes the 400%
FPL eligibility limit, so households above 400% FPL pay at most 8.5% of
income for the benchmark plan.

The three schedule lists are replaced together: the threshold list has one
more entry than the rate lists, and the 2026 law's lists have a 133% FPL
threshold the enhanced schedule doesn't.
income for the benchmark plan. H.R. 1834 passed the House on January 8,
2026; it has not been enacted.

Returns:
Reform: PolicyEngine reform object
"""
return Reform.from_dict(
{
"gov.aca.required_contribution_percentage.threshold": {ENHANCED_PERIOD: ENHANCED_THRESHOLDS},
"gov.aca.required_contribution_percentage.initial": {ENHANCED_PERIOD: ENHANCED_INITIAL},
"gov.aca.required_contribution_percentage.final": {ENHANCED_PERIOD: ENHANCED_FINAL},
"gov.aca.ptc_income_eligibility[2].amount": {ENHANCED_PERIOD: True},
},
country_id="us",
)
return Reform.from_dict({**_enhanced_schedule(), **NO_INCOME_CAP}, country_id="us")


def _contrib_reform(module: str, name: str):
Expand All @@ -57,6 +66,9 @@ def _contrib_reform(module: str, name: str):
def create_700fpl_reform():
"""Create 700% FPL extension reform (Bipartisan Health Insurance Affordability Act).

Introduced by Reps. Dunn (R-FL) and Schneider (D-IL) on December 9, 2025;
not enacted.

This implements the proposed bill's schedule:
- 200-250% FPL: 2% to 4%
- 250-300% FPL: 4% to 6%
Expand Down
1 change: 1 addition & 0 deletions changelog.d/aca-2027-backend.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Model 2027 coverage in the calculator API (requests without a year still get 2026), with H.R. 1834, and return 2026 current law for the same household and incomes alongside 2027 when asked (show_prior_year). Report the benchmark premium at each income. Pin policyengine-us 2.138.2, which has the published 2027 premiums and counts the used premium tax credit in household net income, and give the Modal function 4 GB.
1 change: 1 addition & 0 deletions changelog.d/aca-2027-backend.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Draw the FPL lines from the prior year's poverty guideline, which the credit uses, and give Alaska and Hawaii households their own guideline for the credit instead of the 48 states'.
1 change: 1 addition & 0 deletions changelog.d/aca-2027-calculator.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Compare 2027 coverage with 2026 under current law in the calculator, and, with a checkbox, 2027 under H.R. 1834: what the household pays for the benchmark plan after the credit, the credit itself, and both at an income the user enters. The calculator reads top to bottom: the Overview's four example households, whose results are stored (precompute_calculator_examples.py) and appear without a request, then the household form, then the results.
1 change: 1 addition & 0 deletions changelog.d/aca-2027-calculator.removed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Drop the year setting and the other scenarios (the 700% FPL bill and CRFB's two bracket options) from the calculator page; old links still load their household.
1 change: 1 addition & 0 deletions changelog.d/aca-2027-overview.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Retell the Overview around 2027 premiums, in the earlier version's order: how the credits work, including that households below 100% FPL get none (and that in most non-expansion states an adult without children below that line falls in the coverage gap, qualifying for neither Medicaid nor a credit), their 2021–2025 enhancements and expiry; a Texas adult below 400% FPL and a Pennsylvania adult above it as benchmark premiums rise from 2026 to 2027, the credit absorbing the increase for the first while the second pays all of it; what reviving the enhanced credits (H.R. 1834) would do for it, with a table that adds a column at each step; and four example households, from precomputed policyengine-us results. A new section charts the Pennsylvania example's marginal tax rate across incomes, with current law's cliff at 400% FPL and H.R. 1834's 8.5% phase-out (precompute_cliff_household.py now saves household net income and marginal rates). On wide screens the Overview pins the active section's chart on the left while its text scrolls past in cards on the right, as the earlier version did; on narrower screens it is one column, with each chart under its text. The app uses PolicyEngine's colors and type throughout. The Overview labels its lines directly (with a legend where they run too close), fades its charts in as they scroll into view, and marks the hovered income on each chart. A data check (scripts/check_data.mjs) runs before every build and fails it if the precomputed files disagree. A Methodology tab, beside the Overview and the Calculator, covers the model and data, the policies compared and the limitations; the Overview's methods section moves there, and the Overview ends with buttons to the calculator and to the Methodology tab. The pages sit on a tinted background with raised white cards, pill-shaped tabs and a white header aligned with the Overview's left edge; part headings are pills, section titles are teal, buttons lift on hover, and the calculator's example households show whether their state expanded Medicaid. The calculator's share button moves under the results as "Share results": its link, which the address bar also shows, carries the comparison, the open tab and the income entered as well as the household, and opening it calculates the household and opens the same view.
1 change: 1 addition & 0 deletions changelog.d/aca-2027-overview.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Treat Idaho as a Medicaid expansion state in the calculator's AI explanation. The Overview and the Methodology tab name KFF as the source of the model's 2026 and 2027 benchmark premiums, the Overview says both examples above 400% FPL live in their state's highest-cost rating area, and it gives where H.R. 1834's credit would end for the Pennsylvania example from the benchmark premium (about $174,550) instead of the last $1,000 step with a credit. The calculator's "Your household" tab asks for earnings, up to $1,000,000, and its cards come from the API at the earnings entered instead of from between the income axis's $1,000 steps, so they no longer blend the incomes on either side of an eligibility limit or of the jump in the share of income at 133% FPL, and Alaska's dividend counts toward the 400% FPL limit. Its text names Medicaid and CHIP only for the members they cover, says a state hasn't expanded Medicaid only where that's true, explains Medicaid's 2027 work requirement, and in the coverage gap shows what a plan costs without a credit. The cards' monthly change lines now match the payments shown, and the charts place 400% FPL on the credit's income. The contribution schedule charts no longer clip their x-axis title, and the marginal tax rate chart's 400% FPL label no longer covers the cliff. A link straight to the calculator or the Methodology tab no longer causes a hydration error, and a calculator link opened on the page (pasted, or with back and forward) now shows that link's household.
1 change: 1 addition & 0 deletions changelog.d/aca-2027-overview.removed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove the Explore Households page; its links open the Overview.
1 change: 1 addition & 0 deletions changelog.d/calculate-at-income.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add `/api/calculate-at-income`, which calculates each scenario for a household at one level of earnings, with what covers each member (Medicaid, CHIP, or Medicaid's work requirement keeping them off it) and, in the coverage gap, what a plan would cost without a credit. `/api/calculate` also returns the credit's income (`magi`) at each point. The API builds H.R. 1834's version of the model once per process, so a calculation under it takes under a second instead of about ten.
1 change: 1 addition & 0 deletions changelog.d/calculate-at-income.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Pay current law's premium tax credit at exactly 400% FPL, which 26 U.S.C. 36B(c)(1)(A) allows and policyengine-us 2.138.2 doesn't, in both API endpoints.
1 change: 1 addition & 0 deletions changelog.d/overview-centered-chart.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
On wide screens the Overview's pinned chart is larger and sits in the middle of the screen: its card is as tall as the screen allows (up to 720px) and each chart fills it, and the text cards are the same height, with their text centered, so the card in the middle of the screen lines up with the chart, and that card's section is the active one. The Overview is 1320px wide instead of 1200px, and the header lines up with its left edge. The calculator shows a spinner, with the step the server reports, instead of a progress bar while it calculates a household, and the "Your household" cards show a small spinner while they load.
1 change: 1 addition & 0 deletions changelog.d/overview-chart-labels.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The Overview's bulleted lists show their bullets again. The line names on the Overview's and the calculator's charts no longer touch a line, the 400% FPL line or its name: each name moves to the nearest clear spot beside its line, away from where two lines overlap, and a chart shows its legend instead when a name has no room, as on a phone. A legend that wraps onto a second line no longer overlaps the chart.
1 change: 1 addition & 0 deletions changelog.d/remove-explain-with-ai.removed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove the calculator's "Explain with AI" button and its explanation window. A link with `ai=1` opens the household's results. The API's `/api/explain` endpoint is unchanged.
42 changes: 42 additions & 0 deletions example_households.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
"""The four example households the Overview walks through.

Shared by precompute_households.py, which computes the Overview's table, and
precompute_calculator_examples.py, which stores the calculator's result for
each so the calculator can show it without a request. No dependencies, so the
calculator script runs anywhere.
"""

YEAR = 2027
PRIOR_YEAR = 2026

# Two households below current law's 400% FPL limit and two above it.
EXAMPLES = [
{
"key": "texas_single",
"name": "Single adult",
"description": "Age 40, Harris County, Texas",
"household": dict(age_head=40, age_spouse=None, dependent_ages=[], state="TX", county="Harris County"),
"income": 40_000,
},
{
"key": "florida_family",
"name": "Family of four",
"description": "Parents aged 40, children aged 10 and 8, Hillsborough County, Florida",
"household": dict(age_head=40, age_spouse=40, dependent_ages=[10, 8], state="FL", county="Hillsborough County"),
"income": 75_000,
},
{
"key": "pennsylvania_single",
"name": "Single adult",
"description": "Age 45, Lebanon County, Pennsylvania",
"household": dict(age_head=45, age_spouse=None, dependent_ages=[], state="PA", county="Lebanon County"),
"income": 104_000,
},
{
"key": "california_couple",
"name": "Couple in their 60s",
"description": "Ages 64 and 62, San Benito County, California",
"household": dict(age_head=64, age_spouse=62, dependent_ages=[], state="CA", county="San Benito County"),
"income": 90_000,
},
]
Loading