← Back to story

Topic & focus effectsMethodology recipe

Schools that brand themselves 'STEM' don't outperform other schools on math

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

Identified schools whose name contains STEM-related keywords (STEM, Science, Tech, Math, Engineering) and compared their math outcomes with peer (same grade_band + proclivity decile) schools without those keywords.

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/*.

  • Database tablepeer_groups + school_peers

    K-nearest-neighbor peer groups derived from grade band + admission category (hard match) plus demographics + topic similarity (weighted). Default k=40. Built in scripts/derive/peer-groups.ts.

Steps

  1. WHERE name ILIKE '%stem%' OR ILIKE '%science%' OR ILIKE '%tech%' OR ILIKE '%math%' OR ILIKE '%engineering%'; pull math proficiency.

  2. For each STEM-named school, look up its peer group; compute the peer-adjusted math residual.

Caveats

Name-based filtering is approximate (e.g., 'Manhattan Center for Science and Mathematics' is a STEM-focus school but matches the filter for the wrong reason). Manual roster of STEM-themed schools would be more precise.

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.