spb/qwhpi Public
QHPI — Quebec Housing Price Index: quality-adjusted, hierarchically pooled housing price indexes.
Python 63.9%
TypeScript 25.4%
CSS 5.5%
TeX 3.5%
SQL 0.8%
Makefile 0.5%
Dockerfile 0.5%
1/**2 * =============================================================================3 * QWHPI — Quebec Weekly Housing Price Index4 * Author : Simon-Pierre Boucher5 * Contact : contact@spboucher.ai6 * File : web/components/ReliabilityBadge.tsx7 * Purpose : Reliability grade badge (A–E) — icon + label, never color alone.8 * =============================================================================9 */1011const DESCRIPTIONS: Record<string, string> = {12 A: "Very strong — high liquidity, tight confidence band",13 B: "Strong — reliable weekly signal",14 C: "Moderate — partial shrinkage toward parent trend",15 D: "Thin — heavy shrinkage, interpret levels not weeks",16 E: "Model-implied — published for transparency only",17};1819export default function ReliabilityBadge({ grade }: { grade: string }) {20 const good = grade === "A" || grade === "B";21 const weak = grade === "D" || grade === "E";22 return (23 <span className="badge" title={DESCRIPTIONS[grade] ?? ""}>24 <span25 className="dot"26 style={{27 background: good28 ? "var(--good)"29 : weak30 ? "var(--serious)"31 : "var(--series-4)",32 }}33 />34 Reliability {grade}35 {weak ? " ⚠" : ""}36 </span>37 );38}39