{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Time Series Schema[DRAFT]",
  "description": "Schema for time series data type based on DDI 2.5",
  "type": "object",
  "properties": {
    "docDscr": {
      "type": "object",
      "title": "Document Description",
      "description": "Study Description",
      "properties": {
        "titl": {
          "type": "string",
          "title": "Title",
          "description": "Title"
        },
        "subTitl": {
          "type": "string",
          "title": "Subtitle",
          "description": "Subtitle"
        },
        "altTitl": {
          "type": "string",
          "title": "Alternative title"
        },
        "parTitl": {
          "title": "Parallel Title",
          "type": "string"
        },
        "idno": {
          "title": "Unique Identifier",
          "type": "string"
        },
        "authEnty": {
          "type": "array",
          "title": "Primary Investigators",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "title": "Agency name",
                "type": "string"
              },
              "affiliation": {
                "title": "Affiliation",
                "type": "string"
              }
            }
          },
          "required": [
            "name"
          ]
        },
        "othId": {
          "type": "array",
          "title": "Other Identifications /Acknowledgments",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "title": "Name",
                "type": "string"
              },
              "affiliation": {
                "title": "Affiliation",
                "type": "string"
              },
              "role": {
                "title": "Role",
                "type": "string"
              }
            }
          },
          "required": [
            "name"
          ]
        },
        "producer": {
          "type": "array",
          "title": "Producers",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "title": "Name",
                "type": "string"
              },
              "abbr": {
                "title": "Abbreviation",
                "type": "string"
              },
              "role": {
                "title": "Role",
                "type": "string"
              },
              "affiliation": {
                "type": "string",
                "title": "Affiliation"
              }
            }
          },
          "required": [
            "name"
          ]
        },
        "copyright": {
          "title": "Copyrights",
          "type": "string"
        },
        "prodDate": {
          "title": "Date of Production",
          "type": "string"
        },
        "prodPlac": {
          "title": "Place of production",
          "type": "string"
        },
        "software": {
          "title": "Software used in production",
          "type": "string"
        },
        "fundAg": {
          "type": "array",
          "title": "Funding agency/sponsor",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "title": "Name",
                "type": "string"
              },
              "abbr": {
                "title": "Abbreviation",
                "type": "string"
              },
              "role": {
                "title": "Role",
                "type": "string"
              }
            }
          },
          "required": [
            "name",
            "role"
          ]
        },
        "grantNo": {
          "title": "Grant number",
          "type": "string"
        },
        "distStmt": {
          "type": "object",
          "title": "Distributor Statement",
          "properties": {
            "contact": {
              "type": "array",
              "title": "Contact",
              "description": "Contact",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "title": "Name",
                    "type": "string"
                  },
                  "affiliation": {
                    "title": "Affiliation",
                    "type": "string"
                  },
                  "email": {
                    "title": "Email",
                    "type": "string"
                  }
                }
              },
              "required": [
                "name"
              ]
            },
            "depositr": {
              "type": "array",
              "title": "Depositor",
              "description": "Depositor",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "title": "Name",
                    "type": "string"
                  },
                  "abbr": {
                    "title": "Abbreviation",
                    "type": "string"
                  },
                  "affiliation": {
                    "title": "Affiliation",
                    "type": "string"
                  }
                }
              },
              "required": [
                "name"
              ]
            },
            "depDate": {
              "title": "Date of deposit",
              "type": "string"
            },
            "distDate": {
              "title": "Date of distribution",
              "type": "string"
            }
          }
        },
        "serStmt": {
          "type": "object",
          "title": "Series Statement",
          "properties": {
            "serName": {
              "title": "Series name",
              "type": "string",
              "enum": [
                "Agricultural Survey",
                "Child Labour Survey",
                "Priority Survey",
                "Population Survey"
              ]
            },
            "serInfo": {
              "title": "Series information",
              "type": "string"
            }
          }
        },
        "verStmt": {
          "type": "object",
          "title": "Version Statement",
          "properties": {
            "version": {
              "title": "Version",
              "type": "string"
            },
            "date": {
              "title": "Version date",
              "type": "string"
            },
            "verResp": {
              "title": "Version responsibility statement",
              "type": "string"
            },
            "notes": {
              "title": "Version notes",
              "type": "string"
            }
          }
        },
        "biblCit": {
          "type": "string",
          "title": "Bibliographic Citation"
        },
        "holdings": {
          "type": "array",
          "title": "Holdings Information",
          "description": "Holdings information",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "title": "Name",
                "type": "string"
              },
              "location": {
                "title": "Location",
                "type": "string"
              },
              "callno": {
                "title": "Callno",
                "type": "string"
              },
              "uri": {
                "title": "URI",
                "type": "string"
              }
            }
          },
          "required": [
            "name"
          ]
        }
      }
    },
    "stdyDscr": {
      "type": "object",
      "description": "Study Description",
      "properties": {
        "titl": {
          "type": "string",
          "title": "Title",
          "description": "Title"
        },
        "subTitl": {
          "type": "string",
          "title": "Subtitle",
          "description": "Subtitle"
        },
        "altTitl": {
          "type": "string",
          "title": "Alternative title"
        },
        "parTitl": {
          "title": "Parallel Title",
          "type": "string"
        },
        "idno": {
          "title": "Unique Identifier",
          "type": "string"
        },
        "authEnty": {
          "type": "array",
          "title": "Primary Investigators",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "title": "Agency name",
                "type": "string"
              },
              "affiliation": {
                "title": "Affiliation",
                "type": "string"
              }
            }
          },
          "required": [
            "name"
          ]
        },
        "othId": {
          "type": "array",
          "title": "Other Identifications /Acknowledgments",
          "description": "Other Identifications /Acknowledgments",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "title": "Name",
                "type": "string"
              },
              "affiliation": {
                "title": "Affiliation",
                "type": "string"
              },
              "role": {
                "title": "Role",
                "type": "string"
              }
            }
          },
          "required": [
            "name"
          ]
        },
        "producer": {
          "type": "array",
          "title": "Producers",
          "description": "Producers",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "title": "Name",
                "type": "string"
              },
              "abbr": {
                "title": "Abbreviation",
                "type": "string"
              },
              "role": {
                "title": "Role",
                "type": "string"
              },
              "affiliation": {
                "type": "string",
                "title": "Affiliation"
              }
            }
          },
          "required": [
            "name"
          ]
        },
        "copyright": {
          "title": "Copyrights",
          "type": "string"
        },
        "prodDate": {
          "title": "Date of Production",
          "type": "string"
        },
        "prodPlac": {
          "title": "Place of production",
          "type": "string"
        },
        "software": {
          "title": "Software used in production",
          "type": "string"
        },
        "fundAg": {
          "type": "array",
          "title": "Fundings",
          "description": "Fundings",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "title": "Name",
                "type": "string"
              },
              "abbr": {
                "title": "Abbreviation",
                "type": "string"
              },
              "role": {
                "title": "Role",
                "type": "string"
              }
            }
          },
          "required": [
            "name",
            "role"
          ]
        },
        "grantNo": {
          "title": "Grant number",
          "type": "string"
        },
        "distStmt": {
          "type": "object",
          "title": "Distributor Statement",
          "properties": {
            "contact": {
              "type": "array",
              "title": "Contact",
              "description": "Contact",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "title": "Name",
                    "type": "string"
                  },
                  "affiliation": {
                    "title": "Affiliation",
                    "type": "string"
                  },
                  "email": {
                    "title": "Email",
                    "type": "string"
                  }
                }
              },
              "required": [
                "name"
              ]
            },
            "depositr": {
              "type": "array",
              "title": "Depositor",
              "description": "Depositor",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "title": "Name",
                    "type": "string"
                  },
                  "abbr": {
                    "title": "Abbreviation",
                    "type": "string"
                  },
                  "affiliation": {
                    "title": "Affiliation",
                    "type": "string"
                  }
                }
              },
              "required": [
                "name"
              ]
            },
            "depDate": {
              "title": "Date of deposit",
              "type": "string"
            },
            "distDate": {
              "title": "Date of distribution",
              "type": "string"
            }
          }
        },
        "serStmt": {
          "type": "object",
          "title": "Series Statement",
          "properties": {
            "serName": {
              "title": "Series name",
              "type": "string",
              "enum": [
                "Agricultural Survey",
                "Child Labour Survey",
                "Priority Survey",
                "Population Survey"
              ]
            },
            "serInfo": {
              "title": "Series information",
              "type": "string"
            }
          }
        },
        "verStmt": {
          "type": "object",
          "title": "Version Statement",
          "properties": {
            "version": {
              "title": "Version",
              "type": "string"
            },
            "date": {
              "title": "Version date",
              "type": "string"
            },
            "verResp": {
              "title": "Version responsibility statement",
              "type": "string"
            },
            "notes": {
              "title": "Version notes",
              "type": "string"
            }
          }
        },
        "biblCit": {
          "type": "string",
          "title": "Bibliographic Citation"
        },
        "holdings": {
          "type": "array",
          "title": "Holdings Information",
          "description": "Holdings information",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "title": "Name",
                "type": "string"
              },
              "location": {
                "title": "Location",
                "type": "string"
              },
              "callno": {
                "title": "Callno",
                "type": "string"
              },
              "uri": {
                "title": "URI",
                "type": "string"
              }
            }
          },
          "required": [
            "name"
          ]
        },
        "studyInfo": {
          "type": "object",
          "title": "Study scope",
          "properties": {
            "keywords": {
              "type": "array",
              "description": "Keywords",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "title": "Keyword",
                    "type": "string"
                  }
                }
              }
            },
            "topcClas": {
              "type": "array",
              "title": "Topic Classification",
              "description": "Topic classification",
              "items": {
                "type": "object",
                "properties": {
                  "topic": {
                    "title": "Topic",
                    "type": "string"
                  },
                  "vocab": {
                    "title": "Vocab",
                    "type": "string"
                  },
                  "vocabURI": {
                    "title": "VocabURI",
                    "type": "string"
                  }
                }
              }
            },
            "abstract": {
              "title": "Abstract",
              "type": "string"
            },
            "timePrd": {
              "type": "array",
              "title": "Time periods (YYYY/MM/DD)",
              "description": "Time periods (YYYY/MM/DD)",
              "items": {
                "type": "object",
                "properties": {
                  "date": {
                    "title": "Date",
                    "type": "string"
                  },
                  "event": {
                    "title": "Event",
                    "type": "string"
                  },
                  "cycle": {
                    "title": "Cycle",
                    "type": "string"
                  }
                }
              },
              "required": [
                "date"
              ]
            },
            "collDate": {
              "type": "array",
              "title": "Dates of Data Collection (YYYY/MM/DD)",
              "description": "Dates of data collection (YYYY/MM/DD)",
              "items": {
                "type": "object",
                "properties": {
                  "date": {
                    "title": "Date",
                    "type": "string"
                  },
                  "event": {
                    "title": "Event",
                    "type": "string"
                  },
                  "cycle": {
                    "title": "Cycle",
                    "type": "string"
                  }
                }
              },
              "required": [
                "date"
              ]
            },
            "nation": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "title": "Name",
                    "type": "string"
                  },
                  "abbreviation": {
                    "title": "Abbreviation",
                    "type": "string"
                  }
                }
              },
              "required": [
                "name"
              ]
            },
            "timeUnit": {
              "description": "Annual, Quarterly, Monthly, Weekly, Daily, or Specific date/time",
              "type": "string"
            },
            "geogCover": {
              "description": "World, Region, Country by Income or some other classification, Urban/Rural, Sub-national",
              "title": "Geographic Coverage",
              "type": "string"
            },
            "geogUnit": {
              "description": "Geographic coverage",
              "title": "Geographic Unit",
              "type": "string"
            },
            "geoBndBox": {
              "title": "Geographic bounding box",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "west": {
                    "title": "West",
                    "type": "string"
                  },
                  "east": {
                    "title": "East",
                    "type": "string"
                  },
                  "south": {
                    "title": "South",
                    "type": "string"
                  },
                  "north": {
                    "title": "North",
                    "type": "string"
                  }
                }
              }
            },
            "boundPoly": {
              "title": "Geographic bounding polygon",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "gringLat": {
                    "title": "Latitude",
                    "type": "string"
                  },
                  "gringLon": {
                    "title": "Longitude",
                    "type": "string"
                  }
                }
              }
            },
            "anlyUnit": {
              "title": "Unit of analysis",
              "type": "string"
            },
            "universe": {
              "title": "Universe",
              "type": "string"
            },
            "dataKind": {
              "title": "Kind of data",
              "type": "string",
              "enum": [
                "Sample survey data[ssd]",
                "Census/enumeration data[cen]",
                "Administrative records data[adm]",
                "Aggregate data[agg]",
                "Event/transaction data[even]",
                "Observation data/ratings[obs]"
              ]
            },
            "notes": {
              "title": "Study notes",
              "type": "string"
            }
          }
        },
        "method": {
          "type": "object",
          "title": "Methodology and Processing",
          "properties": {
            "timeMeth": {
              "description": "Time method",
              "title": "Time Method",
              "type": "string"
            },
            "dataCollector": {
              "title": "Data collector",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "title": "Name",
                    "type": "string"
                  },
                  "abbr": {
                    "title": "Abbreviation",
                    "type": "string"
                  },
                  "affiliation": {
                    "title": "Affiliation",
                    "type": "string"
                  }
                }
              }
            },
            "frequenc": {
              "title": "Frequency of data collection",
              "type": "string"
            },
            "sampProc": {
              "title": "Sampling Procedure",
              "type": "string"
            },
            "deviat": {
              "title": "Major Deviations from the Sample Design",
              "type": "string"
            },
            "collMode": {
              "title": "Mode of Data Collection",
              "type": "string",
              "enum": [
                "Computer Assisted Personal Interview[capi]",
                "Computer Assisted Telephone Interview[cati]",
                "Face-to-Face[f2f]",
                "Focus Group[foc]",
                "Internet[int]",
                "Other[oth]"
              ]
            },
            "resInstru": {
              "title": "Type of Research Instrument",
              "type": "string",
              "description": "The type of data collection instrument used. \"Structured\" indicates an instrument in which all respondents are asked the same questions/tests, possibly with precoded answers. If a small portion of such a questionnaire includes open-ended questions, provide appropriate comments. \"Semi-structured\" indicates that the research instrument contains mainly open-ended questions. \"Unstructured\" indicates that in-depth interviews were conducted. "
            },
            "dataSrc": {
              "title": "Data sources",
              "type": "string"
            },
            "srcOrig": {
              "title": "Origins of Sources",
              "type": "string"
            },
            "srcChar": {
              "title": "Characteristics of Source Noted",
              "type": "string"
            },
            "srcDocu": {
              "title": "Documentation and Access to Sources",
              "type": "string"
            },
            "collSitu": {
              "title": "Characteristics of Data Collection Situation",
              "type": "string"
            },
            "actMin": {
              "title": "Actions to Minimize Losses",
              "type": "string"
            },
            "ConOps": {
              "title": "Control Operations",
              "type": "string"
            },
            "weight": {
              "title": "Weighting",
              "type": "string"
            },
            "cleanOps": {
              "title": "Cleaning Operations",
              "type": "string"
            },
            "notes": {
              "title": "Notes",
              "type": "string"
            },
            "respRate": {
              "title": "Response Rate",
              "type": "string"
            },
            "EstSmpErr": {
              "title": "Estimates of Sampling Error",
              "type": "string"
            },
            "dataAppr": {
              "title": "Other Forms of Data Appraisal",
              "type": "string"
            },
            "stdyClas": {
              "title": "Class of the Study",
              "type": "string"
            }
          }
        },
        "dataAccess": {
          "type": "object",
          "title": "Methodology and Processing",
          "properties": {
            "accsPlac": {
              "title": "Location of Data Collection",
              "type": "string"
            },
            "origArch": {
              "title": "Archive Where Study Originally Stored",
              "type": "string"
            },
            "avlStatus": {
              "title": "Availability Status",
              "type": "string"
            },
            "collSize": {
              "title": "Extent of Collection",
              "type": "string"
            },
            "complete": {
              "title": "Completeness of Study Stored",
              "type": "string"
            },
            "fileQnty": {
              "title": "Number of Files",
              "type": "string"
            }
          }
        },
        "dataAccess_useStmt": {
          "type": "object",
          "title": "Use Statement",
          "properties": {
            "confDec": {
              "title": "Confidentiality Declaration",
              "type": "string"
            },
            "specPerm ": {
              "title": "Special Permissions",
              "type": "string"
            },
            "restrctn": {
              "title": "Restrictions",
              "type": "string"
            },
            "contact": {
              "type": "array",
              "title": "Data access contact",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "title": "Name",
                    "type": "string"
                  },
                  "affiliation": {
                    "title": "Affiliation",
                    "type": "string"
                  },
                  "email": {
                    "title": "Email",
                    "type": "string"
                  }
                }
              },
              "required": [
                "name"
              ]
            },
            "citReq": {
              "title": "Citation Requirement",
              "type": "string"
            },
            "deposReq": {
              "title": "Deposit Requirement",
              "type": "string"
            },
            "Conditions": {
              "title": "Conditions",
              "type": "string"
            },
            "disclaimer": {
              "title": "Disclaimer",
              "type": "string"
            }
          }
        }
      }
    },
    "datasets": {
      "description": "Description of data files",
      "type": "object",
      "properties": {
        "fileDscr": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "title": "Unique File ID",
                "description": "Unique File ID"
              },
              "uri": {
                "type": "string",
                "title": "File URI",
                "description": "File URI"
              },
              "fileName": {
                "description": "File name",
                "title": "File Name",
                "type": "string"
              },
              "caseQnty": {
                "description": "Cases count",
                "title": "Cases Count",
                "type": "string"
              },
              "varQnty": {
                "description": "Variable count",
                "title": "Variable Count",
                "type": "string"
              },
              "fileType": {
                "description": "File type",
                "title": "File Type",
                "type": "string"
              },
              "filePlac": {
                "description": "Producer",
                "title": "Producer",
                "type": "string"
              },
              "dataChck": {
                "description": "Data processing checks",
                "title": "Data Processing Checks",
                "type": "string"
              },
              "dataMsng": {
                "description": "Missing data",
                "title": "Missing Data",
                "type": "string"
              },
              "version": {
                "description": "File version information",
                "title": "File Version Information",
                "type": "string"
              },
              "notes": {
                "description": "Notes",
                "title": "Notes",
                "type": "string"
              }
            }
          },
          "required": [
            "name"
          ]
        }
      },
      "required": [
        "id",
        "fileName"
      ]
    },
    "variables": {
      "description": "Description of variables",
      "title": "Variables",
      "type": "object",
      "properties": {
        "variable": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "title": "Unique Var ID",
                "description": "Unique Var ID"
              },
              "otherId": {
                "type": "string",
                "description": "User defined ID"
              },
              "fileID": {
                "type": "string",
                "title": "File ID",
                "description": "File ID"
              },
              "name": {
                "title": "Name",
                "type": "string"
              },
              "labl": {
                "title": "Label",
                "type": "string"
              },
              "qstnLit": {
                "description": "Literal Question",
                "type": "string"
              },
              "defntn": {
                "description": "Definition",
                "type": "string"
              },
              "srcInfo": {
                "description": "Source of information",
                "type": "string"
              },
              "measUnit": {
                "description": "Measurement unit e.g. currency, number, percentage, etc.",
                "type": "string"
              },
              "timeUnit": {
                "title": "Time unit",
                "description": "Annual, Quarterly, Monthly, Weekly, Daily, or Specific date/time",
                "type": "string"
              },
              "geogCover": {
                "title": "Time unit",
                "description": "World, Region, Country by Income or some other classification, Urban/Rural, Sub-national",
                "type": "string"
              },
              "imputation": {
                "title": "Imputation",
                "description": "Imputation",
                "type": "string"
              },
              "derivation": {
                "title": "derivation",
                "description": "derivation",
                "type": "string"
              },
              "qltyChecks": {
                "title": "Quality checks",
                "description": "Quality checks",
                "type": "string"
              },
              "catgry": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "title": "Value",
                      "type": "string"
                    },
                    "labl": {
                      "title": "Label",
                      "type": "string"
                    }
                  },
                  "required": [
                    "value",
                    "labl"
                  ]
                }
              },
              "notes": {
                "description": "Notes",
                "type": "string"
              },
              "universe": {
                "description": "Universe",
                "type": "string"
              },
              "sumStat": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "title": "Type",
                      "type": "string",
                      "description": "mean, medn, mode, vald, invd, min, max, stdev, other"
                    },
                    "value": {
                      "title": "Value",
                      "type": "string"
                    },
                    "weight": {
                      "title": "Weight",
                      "type": "string"
                    },
                    "wgtd": {
                      "title": "Is Weighted?",
                      "type": "string",
                      "description": "wgtd, not-wgtd"
                    }
                  },
                  "required": [
                    "value",
                    "labl"
                  ]
                }
              },
              "custodian": {
                "type": "array",
                "title": "Custodian",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "title": "Name",
                      "type": "string"
                    },
                    "affiliation": {
                      "title": "Affiliation",
                      "type": "string"
                    },
                    "role": {
                      "title": "Role",
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          },
          "required": [
            "variable"
          ]
        }
      }
    },
    "varGrp": {
      "type": "array",
      "description": "Description of variable group",
      "title": " ",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "title": "Type",
            "type": "string",
            "enum": [
              "subject",
              "section",
              "multiResp",
              "grid",
              "display",
              "repetition",
              "version",
              "iteration",
              "analysis",
              "pragmatic",
              "record",
              "file",
              "randomized",
              "other"
            ]
          },
          "labl": {
            "title": "Label",
            "type": "string"
          },
          "universe": {
            "title": "Universe",
            "type": "string"
          },
          "notes": {
            "title": "Notes",
            "type": "string"
          },
          "txt": {
            "title": "Text",
            "type": "string"
          },
          "defntn": {
            "title": "Definition",
            "type": "string"
          }
        }
      }
    },
    "othrMat": {
      "description": "todo",
      "type": "string"
    }
  }
}