{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Bodování řidičů - Schéma otevřených dat",
  "description": "JSON schéma pro dataset bodování řidičů podle územních jednotek. Určeno pro opakované měsíční publikace (stav_k_datu ve formátu RRRR_MM).",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "uzemi_txt": {
      "type": "string",
      "minLength": 1,
      "description": "Název územní jednotky"
    },
    "b1": {
      "type": "integer",
      "minimum": 0,
      "description": "Počet řidičů s 1 body"
    },
    "b2": {
      "type": "integer",
      "minimum": 0,
      "description": "Počet řidičů s 2 body"
    },
    "b3": {
      "type": "integer",
      "minimum": 0,
      "description": "Počet řidičů s 3 body"
    },
    "b4": {
      "type": "integer",
      "minimum": 0,
      "description": "Počet řidičů s 4 body"
    },
    "b5": {
      "type": "integer",
      "minimum": 0,
      "description": "Počet řidičů s 5 body"
    },
    "b6": {
      "type": "integer",
      "minimum": 0,
      "description": "Počet řidičů s 6 body"
    },
    "b7": {
      "type": "integer",
      "minimum": 0,
      "description": "Počet řidičů s 7 body"
    },
    "b8": {
      "type": "integer",
      "minimum": 0,
      "description": "Počet řidičů s 8 body"
    },
    "b9": {
      "type": "integer",
      "minimum": 0,
      "description": "Počet řidičů s 9 body"
    },
    "b10": {
      "type": "integer",
      "minimum": 0,
      "description": "Počet řidičů s 10 body"
    },
    "b11": {
      "type": "integer",
      "minimum": 0,
      "description": "Počet řidičů s 11 body"
    },
    "b12": {
      "type": "integer",
      "minimum": 0,
      "description": "Počet řidičů s 12 body"
    },
    "pocet_bodovanych_ridicu": {
      "type": "integer",
      "minimum": 0,
      "description": "Celkový počet řidičů s alespoň 1 bodem"
    },
    "celkovy_pocet_ridicu": {
      "type": "integer",
      "minimum": 0,
      "description": "Celkový počet evidovaných řidičů"
    },
    "pohlavi_txt": {
      "type": "string",
      "enum": [
        "muž",
        "žena",
        "celkem"
      ],
      "description": "Pohlaví řidičů"
    },
    "uzemi_typ": {
      "type": "string",
      "enum": [
        "kraj",
        "správní obvod obce s rozšířenou působností",
        "stát"
      ],
      "description": "Typ územní jednotky"
    },
    "stav_k_datu": {
      "type": "string",
      "pattern": "^\\d{4}_\\d{2}$",
      "description": "Datum ve formátu RRRR_MM"
    }
  },
  "required": [
    "uzemi_txt",
    "b1",
    "b2",
    "b3",
    "b4",
    "b5",
    "b6",
    "b7",
    "b8",
    "b9",
    "b10",
    "b11",
    "b12",
    "pocet_bodovanych_ridicu",
    "celkovy_pocet_ridicu",
    "pohlavi_txt",
    "uzemi_typ",
    "stav_k_datu"
  ]
}