From c4c0aa63bdf80e12a2b2019d913cb2c72d170c00 Mon Sep 17 00:00:00 2001 From: Jared Knowles Date: Mon, 10 Aug 2026 13:19:39 -0400 Subject: [PATCH] Use three-year model (unified_m3_mod) to fetch observed data for all waves One-year models don't return historical arrest data; three-year models include observed counts across all CRDC waves (15-16, 17-18, 21-22). --- src/components/ChartPanel.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/ChartPanel.jsx b/src/components/ChartPanel.jsx index e3be686..7026c6b 100644 --- a/src/components/ChartPanel.jsx +++ b/src/components/ChartPanel.jsx @@ -28,11 +28,12 @@ export default function ChartPanel({ district, state }) { } setNationalRates(nat) - // Fetch all 3 waves × default model (unified_m2_mod) for Chart 1 + Charts 2-3 + // Fetch all 3 waves × three-year model (unified_m3_mod) for Chart 1 + Charts 2-3 + // Three-year models return observed data for all waves const waves = ['21-22', '17-18', '15-16'] const waveData = {} await Promise.all(waves.map(async (year) => { - try { waveData[year] = await api.fetchDistrictEstimates(district.leaid, { model: 'unified_m2_mod', year }) } catch(e) {} + try { waveData[year] = await api.fetchDistrictEstimates(district.leaid, { model: 'unified_m3_mod', year }) } catch(e) {} })) // Fetch all 4 quadrant models for Charts 4-6 (8 groups × 4 models, but we batch by model)