import type { ReactElement } from 'react' import { GINI_LETTER_STRIP } from '../utils/giniLetterGrade' const TREND_LEGEND = [ { icon: '↑↑', label: 'Strong improvement', className: 'text-emerald-700' }, { icon: '↑', label: 'Slight improvement', className: 'text-emerald-600' }, { icon: '→', label: 'Flat', className: 'text-slate-500' }, { icon: '↓', label: 'Slight decline', className: 'text-amber-700' }, { icon: '↓↓', label: 'Notable decline', className: 'text-rose-700' }, ] as const /** Trend arrows for the scorecard table (see copy: area ACS change, not benchmark). */ export function ScorecardTrendLegend(): ReactElement { return (

How to read this page

This area’s trend column

{TREND_LEGEND.map((row) => ( {row.icon} {row.label} ))}

Not vs benchmark. Arrows follow percent change in{' '} this area’s published ACS estimate (↑ rose, ↓ fell). “Strong / Slight” is move size (about 8%+ absolute change = strong / double arrow). “Improvement / decline” and the Favorable chip mean that move is good or bad for that metric’s direction (e.g. higher income usually better; longer commute usually worse)—independent of the U.S. / region / state benchmark.

The vs. column is where benchmark shows up (today’s level and optional pace vs benchmark). Section letter grades count favorable{' '} area trends only; switching benchmark does not recalculate them.

) } /** Gini A–F strip for the Gini table row (shown at the bottom of the scorecard). */ export function ScorecardGiniLegend(): ReactElement { return (

Gini inequality (A–F on the Gini row)

{GINI_LETTER_STRIP.map((row, i) => ( {i > 0 ? ( · ) : null} {row.letter} {row.tail ? {row.tail} : null} ))}

(Gini grades) Lower numeric Gini = more equal spread (A is best). Not “efficiency.”

) } /** Full-page legend: trend block then Gini block (prefer using Trend + Gini separately on the scorecard). */ export function ScorecardTrendAndGiniLegend(): ReactElement { return (
) }