Four in ten of Miami-Dade's charter schools skip the district's climate survey, so sector comparisons of school climate are not like for like
A reproducibility log: the data this analysis touched, the queries it ran, and how a third party would re-run it.
Summary
Counted schools with a survey composite by sector and year against the active universe.
Data sources
- Database tablemiami_schools
One row per school number (MSID directory + CCD + GIS); sector, level, magnet status, activity code, region.
- Database tablemiami_school_year_metrics
Long-format facts: (school_number, year, metric_key, subgroup) with value, suppressed, denominator, peer and district percentiles, and the residual-z columns.
- Cached output
data/analysis/miami-survey-enrollment.jsonSurvey coverage and the sentiment-versus-enrollment regressions.
- External datasetM-DCPS School Climate Survey dashboards (students, parents, staff)
Steps
Coverage by sector, among schools active today (closed schools with early-year values are excluded from the numerator, as from the denominator).
SELECT m.year, s.is_charter, COUNT(*) FILTER (WHERE m.value IS NOT NULL) FROM miami_school_year_metrics m JOIN miami_schools s USING (school_number) WHERE m.metric_key = 'survey_students_safety' AND m.subgroup = 'ALL' AND s.activity_code = 'A' AND s.closed_at IS NULL GROUP BY 1, 2;Like-for-like universe for the headline figure: active REGULAR schools with October membership in grades 4–12 in the survey year (packet coverage.students_universe).
Caveats
A school without a composite either did not take part or had fewer than 10 respondents; the workbooks do not distinguish the two.
Reproduce
Follow docs/cities/miami/07_runbook.md: `make miami-discover-all`, parse the PDFs, run the loaders in order, `make miami-verify`, then the analysis scripts. The queries below run directly against the local Postgres.
The recipe lives at data/cities/miami/stories/recipes.ts in the repo.