{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openfutureforum.github.io/executive-intelligence-index/schema/trend-snapshot.schema.json",
  "title": "Trend Snapshot",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "trend_snapshot_id",
    "topic_or_proposition_id",
    "start_date",
    "end_date",
    "frozen_corpus_release",
    "eligible_source_count",
    "raw_component_values",
    "weights",
    "normalized_values",
    "score",
    "limitations",
    "provenance"
  ],
  "properties": {
    "trend_snapshot_id": {
      "type": "string",
      "minLength": 1
    },
    "topic_or_proposition_id": {
      "type": "string",
      "minLength": 1
    },
    "start_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "end_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "frozen_corpus_release": {
      "type": "string",
      "minLength": 1
    },
    "eligible_source_count": {
      "type": [
        "integer",
        "null"
      ]
    },
    "new_source_count": {
      "type": [
        "integer",
        "null"
      ]
    },
    "independent_person_count": {
      "type": [
        "integer",
        "null"
      ]
    },
    "independent_organization_count": {
      "type": [
        "integer",
        "null"
      ]
    },
    "role_spread": {
      "type": [
        "integer",
        "null"
      ]
    },
    "geographic_spread": {
      "type": [
        "integer",
        "null"
      ]
    },
    "language_spread": {
      "type": [
        "integer",
        "null"
      ]
    },
    "source_type_spread": {
      "type": [
        "integer",
        "null"
      ]
    },
    "new_supporting_statements": {
      "type": [
        "integer",
        "null"
      ]
    },
    "new_challenging_statements": {
      "type": [
        "integer",
        "null"
      ]
    },
    "raw_component_values": {
      "type": "object"
    },
    "weights": {
      "type": "object"
    },
    "normalized_values": {
      "type": "object"
    },
    "score": {
      "type": [
        "number",
        "null"
      ]
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "review_status": {
      "type": "string",
      "minLength": 1
    },
    "publication_status": {
      "type": [
        "string",
        "null"
      ]
    },
    "workflow_status": {
      "$ref": "common.schema.json#/$defs/workflowStatus"
    },
    "machine_review_status": {
      "$ref": "common.schema.json#/$defs/machineReviewStatus"
    },
    "human_review_status": {
      "$ref": "common.schema.json#/$defs/humanReviewStatus"
    },
    "reviewed_by": {
      "type": [
        "string",
        "null"
      ]
    },
    "reviewed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "provenance": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "common.schema.json#/$defs/provenance"
      }
    },
    "revision_history": {
      "type": "array",
      "items": {
        "$ref": "common.schema.json#/$defs/revision"
      }
    }
  }
}
