← Back to story

COVID recoveryMethodology recipe

District 18 leads NYC's pandemic math recovery — by a lot

A reproducibility log: the data this analysis touched, the queries it ran, the outside sources it leaned on, and the steps a third party would follow to re-run it.

Summary

Ranked all 32 districts by their average per-school change in math proficiency between 2018-19 and 2024-25, surfacing District 18 (East Flatbush) as the largest gainer.

Data sources

  • Database tableschools

    One row per New York City public school (DBN, name, district, borough, school_type, grade_band, latest_enrollment, proclivity_decile, proclivity_score, closed_at, admission_category).

  • Database tableschool_year_metrics

    Long-format per-school per-year metric facts (school_dbn, year, metric_key, subgroup, value, suppressed). Loaded from DOE/NYSED public files via scripts/loaders/*.

Steps

  1. Per-district average of (2024-25 math) − (2018-19 math) at all still-open elementary/middle schools.

    SELECT s.district,
           AVG(m24.value - m18.value) AS avg_change,
           COUNT(*) AS n
      FROM schools s
      JOIN school_year_metrics m18 ON m18.school_dbn=s.dbn AND m18.year='2018-19' AND m18.metric_key='math_all_proficiency' AND m18.subgroup='ALL' AND m18.suppressed=false
      JOIN school_year_metrics m24 ON m24.school_dbn=s.dbn AND m24.year='2024-25' AND m24.metric_key='math_all_proficiency' AND m24.subgroup='ALL' AND m24.suppressed=false
     WHERE s.closed_at IS NULL
     GROUP BY s.district ORDER BY avg_change DESC;

Caveats

Includes the 2022-23 state-test recalibration window. District 18's gain is real in absolute proficiency terms, but a recalibration-aware (z-score) comparison would give a different absolute number.

Reproduce

Clone the repo, set DATABASE_URL to a Postgres with the project schema loaded, run `npx tsx scripts/loaders/<source>.ts` for any not-yet-loaded data, then issue the queries in the Steps section. The story page also lists the exact `metric_key`/`subgroup`/`year` filters used. Searchable by the answer's headline number — every figure is recomputable from the queries shown.

The recipe lives at data/stories/recipes.ts in the repo. Corrections welcome.