{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tickerfacts-com/json-schema/tickerfacts-com-county-context-schema.json",
  "title": "CountyContext",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tickerfacts-com-openapi.json#/components/schemas/CountyContext",
  "properties": {
    "accuracy_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "built_at": {
      "type": "string"
    },
    "id": {
      "description": "County FIPS code.",
      "pattern": "^[0-9]{5}$",
      "type": "string"
    },
    "interpretation": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "notes": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "population": {
      "type": [
        "object",
        "null"
      ]
    },
    "private_industry_employment": {
      "items": {
        "$ref": "#/$defs/CountyIndustry"
      },
      "type": "array"
    },
    "resident_characteristics": {
      "items": {
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "label": {
            "type": "string"
          },
          "margin_of_error_90pct": {
            "type": [
              "number",
              "null"
            ]
          },
          "period": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_basis": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "uncertainty": {
            "type": [
              "string",
              "null"
            ]
          },
          "unit": {
            "type": [
              "string",
              "null"
            ]
          },
          "universe": {
            "type": [
              "string",
              "null"
            ]
          },
          "value": {
            "description": "Null means unavailable, not zero.",
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "label",
          "value",
          "margin_of_error_90pct"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "sources": {
      "items": {
        "type": "object"
      },
      "type": "array"
    },
    "state": {
      "type": "string"
    },
    "state_name": {
      "type": "string"
    },
    "version": {
      "type": "integer"
    }
  },
  "required": [
    "id",
    "name",
    "state",
    "state_name",
    "population",
    "resident_characteristics",
    "private_industry_employment",
    "built_at",
    "sources",
    "notes",
    "interpretation"
  ],
  "type": "object",
  "$defs": {
    "CountyIndustry": {
      "properties": {
        "annual_pay_usd": {
          "type": [
            "number",
            "null"
          ]
        },
        "disclosure": {
          "type": [
            "string",
            "null"
          ]
        },
        "job_growth_pct": {
          "type": [
            "number",
            "null"
          ]
        },
        "jobs": {
          "type": [
            "number",
            "null"
          ]
        },
        "label": {
          "type": [
            "string",
            "null"
          ]
        },
        "naics": {
          "type": "string"
        },
        "national": {
          "description": "The same columns for the whole country.",
          "type": "object"
        },
        "weekly_wage_usd": {
          "type": [
            "number",
            "null"
          ]
        }
      },
      "required": [
        "naics",
        "label",
        "jobs",
        "annual_pay_usd",
        "weekly_wage_usd",
        "job_growth_pct",
        "disclosure"
      ],
      "type": "object"
    }
  }
}