{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "mcps_unified_facts.schema.json",
  "title": "MCPS unified school facts \u2014 fact row",
  "description": "One row of the tidy fact table (285,634 rows). The dataset (.csv/.parquet) is an array of these. Join on `school_code_str` or int(school_number); see README_unified.md.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "source_table",
    "domain",
    "school_number",
    "year",
    "metric",
    "value_text",
    "suppressed"
  ],
  "properties": {
    "source_table": {
      "type": "string",
      "description": "Originating Power BI entity (provenance)"
    },
    "domain": {
      "type": "string",
      "description": "Subject area",
      "enum": [
        "algebra2",
        "ap_ib",
        "ccr",
        "class_size",
        "dibels_lectura",
        "discipline_incidents",
        "drills",
        "enrollment_by_grade",
        "enrollment_subgroup",
        "lre",
        "map_r",
        "mcap",
        "msde_performance",
        "on_track_grad",
        "programs",
        "safety_events",
        "sat",
        "sped_ap_ib",
        "sped_diploma",
        "sped_enrollment_subgroup",
        "sped_lre",
        "sped_msde_performance",
        "sped_sat",
        "sped_staff_services",
        "staff_positions",
        "suspension_rate"
      ]
    },
    "school_number": {
      "type": "string",
      "description": "3-digit MCPS code, or a rollup code (MCPS/ES/MS/HS/SS)"
    },
    "school_code_str": {
      "type": "string",
      "pattern": "^([0-9]{3,}|)$",
      "description": "Zero-padded join key (matches income/bus); blank for rollup codes"
    },
    "school_name": {
      "type": "string",
      "description": "Official long name; blank for rollup codes"
    },
    "school_type": {
      "type": "string",
      "description": "ES / MS / HS / SS / SE / rollup",
      "enum": [
        "",
        "ES",
        "HS",
        "MCPS",
        "MS",
        "NULL",
        "SE",
        "SS"
      ]
    },
    "year": {
      "type": "string",
      "pattern": "^20[0-9]{2}$",
      "description": "Reported file/cohort year"
    },
    "population": {
      "type": "string",
      "description": "Student population filter (All/EML/FARMS/SpecialEd/\u2026)"
    },
    "group": {
      "type": "string",
      "description": "Breakdown dimension (Gender/Race/metric name/\u2026)"
    },
    "subgroup": {
      "type": "string",
      "description": "Category value within the group"
    },
    "grade": {
      "type": "string",
      "description": "Grade level where applicable"
    },
    "category": {
      "type": "string",
      "description": "Secondary classifier (test/offense/diploma/\u2026)"
    },
    "metric": {
      "type": "string",
      "description": "What `value` measures",
      "enum": [
        "avg_class_size",
        "count",
        "fte",
        "graduates",
        "met_ap3_ib4",
        "pct_suspended",
        "pct_tested",
        "percent",
        "percent_met",
        "program_offered",
        "rate",
        "score",
        "service_offered",
        "staff_count"
      ]
    },
    "value": {
      "type": [
        "number",
        "null"
      ],
      "description": "Numeric value; null when suppressed"
    },
    "value_text": {
      "type": "string",
      "description": "Original published string (verbatim)"
    },
    "suppressed": {
      "type": "boolean",
      "description": "True when privacy-suppressed (\u22645.0 / \u226595.0)"
    }
  }
}