Format rate-type validation rows as percentages#96
Open
DTrim99 wants to merge 1 commit into
Open
Conversation
Populace PR #348 adds Census state SPM poverty-rate backtests whose level rows carry unit: "percent" with decimal-fraction values. Thread the unit through the payload parser and row types, and format value cells with a shared fmtUnitValue (0.134 -> "13.4%") in the reforms and staging views. Rows without a unit keep the USD formatting, so pre-#348 payloads render unchanged. Co-Authored-By: Claude Fable 5 <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.
Companion to populace#348, which adds 104 Census state SPM poverty-rate backtests (out-of-sample) to the reform-validation payload. Those level rows carry
unit: "percent"with decimal-fraction values (0.134), which the current views would render as$0.13.unitthrough the payload parser (lib/populace/reforms.ts) and both row interfaces.fmtUnitValueincomponents/shared/format.ts:"percent"→13.4%, anything else →fmtMoneyas before.unit(all existing payloads) render exactly as today. Error/trend columns are relative and unaffected.Typecheck (
npm run lint) andnext buildpass.Motivation: the populace-vs-ECPS parity finding showed state poverty levels diverging up to 11.7pp with nothing on the dashboard to catch it — these rows put per-state poverty error on the board for every release.
🤖 Generated with Claude Code