{
  "$ref": "#/definitions/DtAnalysesWpca",
  "definitions": {
    "DtAnalysesWpca": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "person_id": {
            "type": "string",
            "description": "Identifier of the person (voter_id from votes-table.dt)."
          },
          "name": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "not": {}
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "given_names": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "family_names": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "organizations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "classification": {
                  "type": "string"
                },
                "since": {
                  "anyOf": [
                    {
                      "anyOf": [
                        {
                          "not": {}
                        },
                        {
                          "type": "string",
                          "format": "date"
                        }
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "ISO 8601 date (YYYY-MM-DD). Start of membership."
                },
                "until": {
                  "anyOf": [
                    {
                      "anyOf": [
                        {
                          "not": {}
                        },
                        {
                          "type": "string",
                          "format": "date"
                        }
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "ISO 8601 date (YYYY-MM-DD). End of membership. Null/omitted if current."
                }
              },
              "required": [
                "id"
              ],
              "additionalProperties": false
            },
            "description": "Optional organizations relevant for this person (e.g., parliamentary group/party)."
          },
          "dims": {
            "type": "array",
            "items": {
              "type": [
                "number",
                "null"
              ]
            },
            "description": "Weighted PCA coordinates, one element per dimension (n_dims from definition, default 3). Index 0 = first dimension. Null per element if the person was excluded (included=false)."
          },
          "weight": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "Weighted attendance share used to determine inclusion. 0 = never voted in any weighted vote event, 1 = voted in all."
          },
          "included": {
            "type": "boolean",
            "description": "Whether this person met the lo_limit threshold and is included in the global result."
          },
          "since": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "not": {}
                  },
                  {
                    "type": "string",
                    "format": "date"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO 8601 date (YYYY-MM-DD). Null/omitted if unknown or not bounded."
          },
          "until": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "not": {}
                  },
                  {
                    "type": "string",
                    "format": "date"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO 8601 date (YYYY-MM-DD). Null/omitted if unknown or not bounded."
          },
          "extras": {
            "type": "object",
            "additionalProperties": {},
            "description": "Additional metadata fields passed through from the persons input."
          }
        },
        "required": [
          "person_id",
          "dims",
          "weight",
          "included"
        ],
        "additionalProperties": false
      }
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}