{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/factiq-com/json-schema/factiq-com-data-series-schema.json",
  "title": "DataSeries",
  "x-generated": "2026-11-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/factiq-com-openapi.json#/components/schemas/DataSeries",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id"
    },
    "schemaName": {
      "type": "string",
      "title": "Schemaname"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Name"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Description"
    },
    "units": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Units"
    },
    "seasonality": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Seasonality"
    },
    "dataPoints": {
      "items": {
        "$ref": "#/$defs/DataPoint"
      },
      "type": "array",
      "title": "Datapoints"
    },
    "frequency": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Frequency"
    },
    "state": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "State"
    },
    "county_or_metro_area": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "County Or Metro Area"
    },
    "organization": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Organization"
    },
    "survey_title": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Survey Title"
    },
    "survey_details": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Survey Details"
    },
    "source": {
      "anyOf": [
        {
          "$ref": "#/$defs/SourceInfo"
        },
        {
          "type": "null"
        }
      ]
    },
    "series_id_note": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Series Id Note"
    },
    "replacement_series_ids": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Replacement Series Ids"
    },
    "is_compound": {
      "type": "boolean",
      "title": "Is Compound",
      "default": false
    },
    "data_type": {
      "type": "string",
      "title": "Data Type",
      "default": "timeseries"
    },
    "pivotedColumns": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Pivotedcolumns"
    },
    "pivotedData": {
      "anyOf": [
        {
          "items": {
            "items": {},
            "type": "array"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Pivoteddata"
    }
  },
  "type": "object",
  "required": [
    "id",
    "schemaName",
    "name",
    "description",
    "units",
    "seasonality",
    "dataPoints",
    "frequency",
    "state",
    "county_or_metro_area",
    "organization",
    "survey_title",
    "survey_details"
  ],
  "$defs": {
    "DataPoint": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "integer"
            },
            {
              "type": "string"
            }
          ],
          "title": "Value"
        },
        "label": {
          "type": "string",
          "title": "Label"
        },
        "date": {
          "type": "string",
          "title": "Date"
        },
        "unit": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Unit"
        }
      },
      "type": "object",
      "required": [
        "id",
        "value",
        "label",
        "date",
        "unit"
      ],
      "title": "DataPoint"
    },
    "SourceInfo": {
      "properties": {
        "country": {
          "type": "string",
          "title": "Country"
        },
        "organization_acronym": {
          "type": "string",
          "title": "Organization Acronym"
        },
        "original_info": {
          "type": "string",
          "title": "Original Info"
        }
      },
      "type": "object",
      "required": [
        "country",
        "organization_acronym",
        "original_info"
      ],
      "title": "SourceInfo",
      "description": "Structured source information for search results."
    }
  }
}