Add household-weighted view; hide bootstrap intervals behind a toggle#12
Merged
Conversation
Sensitivity selector
- New "Household-weighted" view ranks models by the canonical
household_equal_impact_scores statistic (each household contributes
equally, output groups within a household are weighted by absolute
reference dollar share with a 0.3 floor — the same statistic the
paper's @tbl-impact-floor reports). Reads precomputed impactScore
from modelStats so no client-side recomputation runs.
- analysis.build_dashboard_payload now reads analysis['impact_summary']
and writes impactScore (and impactCountryScores in the global view)
into modelStats.
- app/src/data.json refreshed with the new fields from the committed
paper/snapshot/20260501/{us,uk}_impact_summary_by_model.csv. Manifest
dashboard sha256 refreshed.
Bootstrap intervals
- Hidden by default. New "Show 95% intervals" checkbox in the controls
row toggles them on; the bootstrap computation is skipped entirely
when off, so first paint no longer pays the 400-draw cost on mobile.
- Intervals stay hidden under the Household-weighted view (no bootstrap
path implemented for that estimator yet).
Verification
- bunx eslint . --max-warnings=0 clean.
- bun run build clean.
- uv run pytest -q clean (190 passed).
- SSR HTML on / contains all six sensitivity views, the Show 95%
intervals toggle, and no Rank/95% strings; Binary only is disabled
on Global as before.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
Two leaderboard tweaks following live-site review:
1. Household-weighted view
household_equal_impact_scoresstatistic (each household contributes equally; outputs within a household are weighted by absolute reference dollar share with a 0.3 floor). This is the same statistic the paper's@tbl-impact-flooris built on.policybench/analysis.py:build_dashboard_payloadreadsanalysis['impact_summary']and writesimpactScore(per country) andimpactCountryScores(in the global view) intomodelStats.app/src/data.jsonregenerated from the committedpaper/snapshot/20260501/{us,uk}_impact_summary_by_model.csv. Manifest dashboard sha256 refreshed.modelStats[].impactScoredirectly when the household-weighted view is active — no client-side recomputation needed.2. Bootstrap intervals hidden by default
Rank N · 95% L–Uline was a lot of noise for casual visitors. The leaderboard now hides intervals by default and exposes aShow 95% intervalscheckbox in the controls row.Verification
uv run pytest -qclean (190 passed)bunx eslint . --max-warnings=0cleanbun run buildclean/contains all six sensitivity views, theShow 95% intervalstoggle, and noRank/95%interval strings;Binary onlyis disabled on Global as before.🤖 Generated with Claude Code