{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "analysis.income_achievement.schema.json",
  "title": "Equity scatter (data/analysis/income_achievement.json)",
  "description": "One point per school: NEIGHBORHOOD median household income vs. MCAP proficiency, plus teacher-equity metrics. Only schools with both income and MCAP are included.",
  "type": "array",
  "items": {
    "type": "object",
    "required": ["school_code", "neighborhood_median_income"],
    "additionalProperties": false,
    "properties": {
      "school_code": { "type": "string" },
      "name": { "type": "string" },
      "type": { "type": "string" },
      "cluster": { "type": ["string", "null"] },
      "lat": { "type": ["number", "null"] },
      "lon": { "type": ["number", "null"] },
      "neighborhood_median_income": { "type": ["number", "null"] },
      "neighborhood_poverty_pct": { "type": ["number", "null"] },
      "mcap_ela_pct": { "type": ["number", "null"] },
      "mcap_math_pct": { "type": ["number", "null"] },
      "latest_rating": { "type": ["number", "null"] },
      "enrollment_by_race": {
        "type": ["object", "null"],
        "additionalProperties": { "type": ["number", "null"] }
      },
      "ela_subgroups": {
        "type": ["object", "null"],
        "additionalProperties": { "type": ["number", "null"] }
      },
      "inexperienced_teacher_pct": { "type": ["number", "null"] },
      "emergency_cred_pct": { "type": ["number", "null"] },
      "poverty_band": { "type": ["string", "null"] }
    }
  }
}
