diff --git a/public/data/national_rates.json b/public/data/national_rates.json new file mode 100644 index 0000000..65766dd --- /dev/null +++ b/public/data/national_rates.json @@ -0,0 +1,44 @@ +{ + "metadata": { + "source": "CRDC School Arrest Rate API / Knowles & Miller 2025, White Paper §3 Data", + "year": "21-22", + "description": "National arrest rates per 1,000 students for each race×sex group in the 2021-22 CRDC. Generated from crdc_2122 with RACE != TOTAL and SEX != TOTAL: sum(ARRESTS) / (sum(stu_enroll)/1000).", + "note": "These are observed national rates, used for comparison in Charts 3 & 6." + }, + "rates_per_1000": { + "WH_F": 0.34, + "WH_M": 0.67, + "BL_F": 1.25, + "BL_M": 1.98, + "HI_F": 0.42, + "HI_M": 0.88, + "AM_F": 0.91, + "AM_M": 1.40 + }, + "observed_arrests": { + "WH_F": 3653, + "WH_M": 7606, + "BL_F": 4420, + "BL_M": 7246, + "HI_F": 2876, + "HI_M": 6270, + "AM_F": 202, + "AM_M": 327 + }, + "enrollment": { + "WH_F": 10624313, + "WH_M": 11322741, + "BL_F": 3530162, + "BL_M": 3667523, + "HI_F": 6805008, + "HI_M": 7109091, + "AM_F": 222963, + "AM_M": 233442 + }, + "totals": { + "arrests": 34846, + "enrollment": 48596489, + "rate_per_1000": 0.72, + "districts_reporting_arrests_pct": 11.6 + } +} diff --git a/src/components/LoadingAnimation.jsx b/src/components/LoadingAnimation.jsx index 99ccbd6..a329865 100644 --- a/src/components/LoadingAnimation.jsx +++ b/src/components/LoadingAnimation.jsx @@ -67,7 +67,7 @@ export default function LoadingAnimation({ district, state }) { ) // ——— National rates (from static fixture, instant) ——— - const nationalPromise = fetch('/data/national_rates.json') + const nationalPromise = fetch(import.meta.env.BASE_URL + 'data/national_rates.json') .then(r => r.json()) .then(data => { /* cache for ChartPanel */ window.__NATIONAL_RATES__ = data }) .catch(() => {})