PhiladelphiaAlgorithm
Peer groups: 40 nearest neighbors on demographics
Each school's peer group is the 40 schools most similar to it demographically, chosen only from schools with the same grade configuration, the same admission bucket (catchment, lottery, selective, CTE, alternative), and the same sector (district vs charter vs cyber). Similarity is the straight-line distance across seven demographic shares.
- 1How it was computedSteps
- Hard-filter candidates to the same school level, admission bucket, and sector bucket.
- Compute Euclidean distance across the demographic shares both schools have (seven for district-run pairs; five for charter pairs, which lack income and English-learner shares); missing features are skipped, not imputed.
- Take the 40 nearest; schools whose filtered universe has fewer than 5 candidates get no peer group (44 of 331).
- k = 20 and k = 30 groups are also derived for sensitivity checks; k = 40 is the default served.
Inputs: pct_black, pct_hispanic, pct_asian, pct_white, pct_english_learner, pct_special_ed, pct_econ_disadv (2024-25) — seven shares for district-run schools; five for charters, which have no income or English-learner shares published; school level, admission type, sector (Master School List)
Evidence: derive_peer_groups.ts — search "function demographicDistance"
- 2Assumptions & caveatsAssumptions
- Demographic shares from 2024-25 define peers for every year.
- Sector is a hard boundary: a district school never peers with a charter.
- Economic disadvantage contributes little to distance because it is top-coded at 100% for most district schools.