{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://ordiva.actum360.com/data/schema/ordiva-launches.v2.schema.json",
 "title": "Ordiva launches, export v2",
 "description": "Every launch with its measures in explicit states (observed, estimated, predicted, not_applicable, unknown), plays, archetypes with the rule path matched, and the full-precision Ordiva Score with its 5th-95th percentile range.",
 "type": "object",
 "properties": {
  "export_version": {
   "const": "2"
  },
  "export_minor": {
   "const": 11
  },
  "schema": {
   "type": "string"
  },
  "method_version": {
   "type": [
    "string",
    "null"
   ]
  },
  "generated_at": {
   "type": [
    "string",
    "null"
   ]
  },
  "site": {
   "type": [
    "string",
    "null"
   ]
  },
  "states": {
   "type": "object",
   "properties": {
    "observed": {
     "type": "string"
    },
    "estimated": {
     "type": "string"
    },
    "predicted": {
     "type": "string"
    },
    "not_applicable": {
     "type": "string"
    },
    "unknown": {
     "type": "string"
    }
   },
   "required": [
    "observed",
    "estimated",
    "predicted",
    "not_applicable",
    "unknown"
   ],
   "additionalProperties": false
  },
  "measures": {
   "type": "object",
   "additionalProperties": {
    "type": "string"
   }
  },
  "n_launches": {
   "type": "integer",
   "minimum": 0
  },
  "launches": {
   "type": "array",
   "items": {
    "$ref": "#/$defs/launch"
   }
  }
 },
 "required": [
  "export_version",
  "method_version",
  "generated_at",
  "states",
  "launches"
 ],
 "additionalProperties": false,
 "$defs": {
  "measure": {
   "type": "object",
   "properties": {
    "value": {
     "type": [
      "number",
      "string",
      "null"
     ]
    },
    "state": {
     "enum": [
      "observed",
      "estimated",
      "predicted",
      "not_applicable",
      "unknown"
     ]
    },
    "grade": {
     "enum": [
      "A",
      "B",
      "C",
      null
     ]
    },
    "source_url": {
     "type": [
      "string",
      "null"
     ]
    },
    "as_of": {
     "type": [
      "string",
      "null"
     ]
    },
    "unit": {
     "type": [
      "string",
      "null"
     ]
    },
    "check": {
     "type": [
      "string",
      "null"
     ]
    },
    "evidence": {
     "enum": [
      "pending",
      "quoted",
      null
     ],
     "description": "quoted: a verbatim quote from the cited source is stored; pending: a figure the score counts whose source is cited but whose exact quote is not stored yet; null: no figure, a judgement, an inferred or disputed claim, or an unquoted figure the score does not count (see claim_status)"
    },
    "claim_status": {
     "enum": [
      "supported",
      "inferred",
      "disputed",
      "unknown",
      null
     ],
     "description": "supported: an exact quote from the cited source; inferred: worked out from other cited facts; disputed: sources disagree (the figure shown is the one we use); unknown: not yet shown either way; null: no figure or no status"
    }
   },
   "required": [
    "value",
    "state",
    "grade",
    "source_url",
    "as_of"
   ],
   "additionalProperties": false
  },
  "archetype": {
   "type": "object",
   "properties": {
    "key": {
     "type": "string"
    },
    "name": {
     "type": "string"
    },
    "via": {
     "enum": [
      "rule",
      "or"
     ]
    },
    "matched": {
     "type": "array",
     "items": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "minItems": 1
     }
    }
   },
   "required": [
    "key",
    "name",
    "via",
    "matched"
   ],
   "additionalProperties": false
  },
  "score": {
   "type": "object",
   "properties": {
    "value": {
     "type": "number",
     "minimum": 0,
     "maximum": 100
    },
    "p5": {
     "type": [
      "number",
      "null"
     ]
    },
    "p95": {
     "type": [
      "number",
      "null"
     ]
    },
    "band": {
     "type": [
      "string",
      "null"
     ]
    },
    "top_quarter": {
     "type": "boolean",
     "description": "Ordiva Score 75 or more (Breakout or better) on the exact score: a fixed score cut, not the top quarter of its peers"
    }
   },
   "required": [
    "value",
    "p5",
    "p95",
    "band",
    "top_quarter"
   ],
   "additionalProperties": false
  },
  "launch": {
   "type": "object",
   "properties": {
    "id": {
     "type": "string",
     "pattern": "^[a-z0-9][a-z0-9-]*$"
    },
    "url": {
     "type": "string",
     "pattern": "^/launch/"
    },
    "product": {
     "type": "string"
    },
    "year": {
     "type": "integer"
    },
    "company": {
     "type": [
      "string",
      "null"
     ]
    },
    "industry": {
     "type": [
      "string",
      "null"
     ]
    },
    "industry_label": {
     "type": [
      "string",
      "null"
     ]
    },
    "category": {
     "type": [
      "string",
      "null"
     ]
    },
    "era": {
     "type": [
      "string",
      "null"
     ]
    },
    "family": {
     "type": [
      "string",
      "null"
     ]
    },
    "era_global": {
     "anyOf": [
      {
       "type": "null"
      },
      {
       "type": "object",
       "properties": {
        "key": {
         "type": "string"
        },
        "name": {
         "type": "string"
        },
        "start": {
         "type": "integer"
        },
        "end": {
         "type": "integer"
        }
       },
       "required": [
        "key",
        "name",
        "start",
        "end"
       ],
       "additionalProperties": false
      }
     ]
    },
    "era_industry": {
     "anyOf": [
      {
       "type": "null"
      },
      {
       "type": "object",
       "properties": {
        "key": {
         "type": "string"
        },
        "name": {
         "type": "string"
        },
        "start": {
         "type": "integer"
        },
        "end": {
         "type": "integer"
        },
        "source": {
         "enum": [
          "industry",
          "global"
         ]
        }
       },
       "required": [
        "key",
        "name",
        "start",
        "end",
        "source"
       ],
       "additionalProperties": false
      }
     ],
     "description": "The launch's industry era; source \"global\" when the industry has no eras of its own and the global era is used"
    },
    "plays": {
     "type": "array",
     "items": {
      "type": "string"
     }
    },
    "archetypes": {
     "type": "array",
     "items": {
      "$ref": "#/$defs/archetype"
     }
    },
    "score": {
     "anyOf": [
      {
       "type": "null"
      },
      {
       "$ref": "#/$defs/score"
      }
     ]
    },
    "too_new": {
     "type": "boolean"
    },
    "under_review": {
     "type": "boolean",
     "description": "True when an open top-priority (P0) issue questions a figure behind the score and leaving that figure out (predicting it from the other outcomes) would change the band. The score, band and rank are unchanged. A figure that only lacks its quote never sets this (see measures' evidence)."
    },
    "score_capped": {
     "type": "object",
     "properties": {
      "by_correction": {
       "const": true
      },
      "uncapped_score": {
       "type": "number"
      },
      "measures": {
       "type": "array",
       "items": {
        "type": "string"
       }
      }
     },
     "required": [
      "by_correction",
      "uncapped_score",
      "measures"
     ],
     "additionalProperties": false,
     "description": "Present when the score is held at its value before a correction: a corrected figure (left out of the score or changed) would have raised it through a prediction. score is the lower, pre-correction score; uncapped_score is the score from the corrected figures; measures are the corrected measures not yet researched again. The hold lifts per measure once a new supported figure is researched."
    },
    "under_review_reasons": {
     "type": "array",
     "items": {
      "type": "object",
      "properties": {
       "key": {
        "type": [
         "string",
         "null"
        ]
       },
       "field": {
        "type": [
         "string",
         "null"
        ]
       },
       "problem": {
        "type": "string"
       },
       "band": {
        "type": [
         "string",
         "null"
        ]
       },
       "band_without": {
        "type": [
         "string",
         "null"
        ]
       },
       "delta": {
        "type": [
         "number",
         "null"
        ]
       }
      },
      "required": [
       "key",
       "field",
       "problem",
       "band",
       "band_without",
       "delta"
      ],
      "additionalProperties": false
     },
     "description": "One per issue: the figure, the problem in plain words, the band now and without the figure, and the score change (score now minus score without)."
    },
    "years_observed": {
     "type": "integer",
     "minimum": 1,
     "description": "Years of the launch's life the record covers: from the launch year to the end year for a line that ended, else to the data year. Older launches have had more time to grow; compare scores with this in mind."
    },
    "unscored_reason": {
     "type": "string",
     "description": "Why the launch is not scored although it is not too new: no cited figure of the product line itself is left. Absent for scored and too-new launches."
    },
    "modeled_score": {
     "type": "object",
     "description": "With unscored_reason: the launch's modeled score (from its longevity and launches like it in its industry and era, never above the broader figure it is part of). Context only: not ranked and not counted in any statistic. Absent otherwise.",
     "properties": {
      "value": {
       "type": "number"
      },
      "p5": {
       "type": [
        "number",
        "null"
       ]
      },
      "p95": {
       "type": [
        "number",
        "null"
       ]
      },
      "band": {
       "type": "string"
      }
     }
    },
    "outcome_percentiles": {
     "type": "object",
     "properties": {
      "revenue": {
       "type": [
        "number",
        "null"
       ]
      },
      "reach": {
       "type": [
        "number",
        "null"
       ]
      },
      "longevity": {
       "type": [
        "number",
        "null"
       ]
      },
      "share": {
       "type": [
        "number",
        "null"
       ]
      }
     },
     "required": [
      "revenue",
      "reach",
      "longevity",
      "share"
     ],
     "additionalProperties": false
    },
    "predicted_outcomes": {
     "type": "array",
     "items": {
      "enum": [
       "revenue",
       "reach",
       "longevity",
       "share"
      ]
     }
    },
    "measures": {
     "type": "object",
     "additionalProperties": {
      "$ref": "#/$defs/measure"
     }
    },
    "business_model": {
     "type": "object",
     "additionalProperties": {
      "type": "array",
      "items": {
       "$ref": "#/$defs/coding"
      }
     },
     "description": "Business-model codings by dimension (beneficiary, payer, value_unit, revenue_mechanism, adoption_mechanism, cost_capital, defensibility, and the launch-level fields). Absent when the launch is not yet coded."
    },
    "relations": {
     "type": "array",
     "items": {
      "$ref": "#/$defs/relation"
     },
     "description": "Typed relationships to named counterparties, each with its source. A list, not an inferred causal graph. Absent when none is coded."
    },
    "timeline": {
     "type": "array",
     "items": {
      "$ref": "#/$defs/timeline_item"
     },
     "description": "The launch's dated record in year order: launch, cited milestones, peak and as-of years of its figures, company events, business-model changes and end of sale. Items without a cited year are left out. Absent under two dated items."
    },
    "trajectory": {
     "type": "array",
     "items": {
      "$ref": "#/$defs/trajectory_point"
     },
     "description": "Year-by-year annual revenue and reach, one cited point per year, measure, basis and period. Years without a cited figure are absent: nothing is interpolated. Only product_line points are compared. Absent when none is cited."
    },
    "prism": {
     "type": "object",
     "properties": {
      "ontology": {
       "type": "string"
      },
      "faces": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "face": {
          "enum": [
           "offer",
           "reach",
           "earn",
           "hold"
          ]
         },
         "reading": {
          "type": "string"
         },
         "percentile": {
          "type": [
           "integer",
           "null"
          ]
         },
         "peer_basis": {
          "type": "string"
         },
         "peer_n": {
          "type": "integer"
         },
         "plays": {
          "type": "array",
          "items": {
           "type": "string"
          }
         },
         "model_values": {
          "type": "array",
          "items": {
           "type": "string"
          }
         },
         "era_tags": {
          "type": "object",
          "additionalProperties": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "description": "The launch ontology's four faces (offer, reach, earn, hold), each with its reading, peer percentile and basis, plays, model values and era tags. Absent when not coded."
    },
    "logo_url": {
     "type": "string",
     "pattern": "^/media/",
     "description": "The company's logo as it was in the launch year: a dated Commons file, the company's own history page or an Internet Archive capture of its site that year. Absent when no dated logo covers the launch year."
    },
    "logo_year": {
     "type": "integer",
     "description": "The year that logo is dated from (first use, or the year it was seen on the company's site). Absent with logo_url."
    }
   },
   "required": [
    "id",
    "url",
    "product",
    "year",
    "company",
    "industry",
    "industry_label",
    "category",
    "era",
    "family",
    "plays",
    "archetypes",
    "score",
    "too_new",
    "years_observed",
    "outcome_percentiles",
    "predicted_outcomes",
    "measures",
    "under_review",
    "under_review_reasons"
   ],
   "additionalProperties": false
  },
  "coding": {
   "type": "object",
   "properties": {
    "value": {
     "type": "string"
    },
    "phase": {
     "enum": [
      "at_launch",
      "later"
     ]
    },
    "since_year": {
     "type": [
      "integer",
      "null"
     ]
    },
    "observed_year": {
     "type": [
      "integer",
      "null"
     ]
    },
    "note": {
     "type": [
      "string",
      "null"
     ]
    },
    "source_url": {
     "type": "string"
    },
    "quote": {
     "type": "string"
    },
    "grade": {
     "enum": [
      "A",
      "B",
      "C",
      null
     ]
    },
    "citation_status": {
     "type": [
      "string",
      "null"
     ]
    },
    "coder_model": {
     "type": [
      "string",
      "null"
     ]
    },
    "coder_provider": {
     "type": [
      "string",
      "null"
     ]
    },
    "prompt_version": {
     "type": [
      "string",
      "null"
     ]
    },
    "public": {
     "type": "boolean",
     "description": "Shown on the public pages and counted in their statistics: the second-model check confirmed it, or it is unchecked with a source graded A or B outside the weak fields (who pays, first market, commercial revenue, distributor, supplier), which need a confirmed check. Other values are exported for review only."
    },
    "check": {
     "enum": [
      "confirmed",
      "rejected",
      "unsure",
      "unchecked"
     ],
     "description": "The latest verdict of the second model's check of the quote against the value"
    }
   },
   "required": [
    "value",
    "phase",
    "since_year",
    "source_url",
    "quote"
   ],
   "additionalProperties": false
  },
  "relation": {
   "type": "object",
   "properties": {
    "relation": {
     "enum": [
      "supplier",
      "platform_host",
      "distributor",
      "licensor",
      "licensee",
      "payer",
      "anchor_customer"
     ]
    },
    "counterparty_name": {
     "type": "string"
    },
    "since_year": {
     "type": [
      "integer",
      "null"
     ]
    },
    "source_url": {
     "type": "string"
    },
    "quote": {
     "type": "string"
    },
    "grade": {
     "enum": [
      "A",
      "B",
      "C",
      null
     ]
    },
    "citation_status": {
     "type": [
      "string",
      "null"
     ]
    },
    "coder_model": {
     "type": [
      "string",
      "null"
     ]
    },
    "coder_provider": {
     "type": [
      "string",
      "null"
     ]
    },
    "prompt_version": {
     "type": [
      "string",
      "null"
     ]
    },
    "public": {
     "type": "boolean",
     "description": "Shown on the public pages and counted in their statistics: the second-model check confirmed it, or it is unchecked with a source graded A or B outside the weak fields (who pays, first market, commercial revenue, distributor, supplier), which need a confirmed check. Other values are exported for review only."
    },
    "check": {
     "enum": [
      "confirmed",
      "rejected",
      "unsure",
      "unchecked"
     ],
     "description": "The latest verdict of the second model's check of the quote against the value"
    },
    "counterparty_company": {
     "type": [
      "string",
      "null"
     ],
     "pattern": "^/company/",
     "description": "The counterparty's company page when the name matched a known company (normalised name or alias)"
    }
   },
   "required": [
    "relation",
    "counterparty_name",
    "since_year",
    "source_url",
    "quote"
   ],
   "additionalProperties": false
  },
  "timeline_item": {
   "type": "object",
   "properties": {
    "kind": {
     "enum": [
      "launch",
      "milestone",
      "figure",
      "event",
      "model",
      "end"
     ]
    },
    "year": {
     "type": "integer"
    },
    "when": {
     "type": [
      "string",
      "null"
     ]
    },
    "title": {
     "type": "string"
    },
    "detail": {
     "type": [
      "string",
      "null"
     ]
    },
    "source_url": {
     "type": [
      "string",
      "null"
     ]
    },
    "grade": {
     "enum": [
      "A",
      "B",
      "C",
      null
     ]
    },
    "quote": {
     "type": [
      "string",
      "null"
     ]
    },
    "state": {
     "enum": [
      "observed",
      "forecast"
     ],
     "description": "forecast only when the data marks it so; never in a score"
    }
   },
   "required": [
    "kind",
    "year",
    "when",
    "title",
    "detail",
    "source_url",
    "grade",
    "quote",
    "state"
   ],
   "additionalProperties": false
  },
  "trajectory_point": {
   "type": "object",
   "properties": {
    "measure": {
     "enum": [
      "annual_revenue",
      "annual_reach"
     ]
    },
    "year": {
     "type": "integer"
    },
    "value": {
     "type": "number",
     "minimum": 0
    },
    "currency": {
     "type": [
      "string",
      "null"
     ]
    },
    "unit": {
     "type": [
      "string",
      "null"
     ]
    },
    "reach_kind": {
     "type": [
      "string",
      "null"
     ]
    },
    "period": {
     "enum": [
      "annual",
      "active",
      "cumulative"
     ],
     "description": "annual: counted over the year; active: in use at one time; cumulative: to date. Reach of different periods is never compared."
    },
    "basis": {
     "enum": [
      "product_line",
      "segment",
      "company"
     ],
     "description": "What the figure covers. Only product_line points are compared."
    },
    "segment": {
     "type": [
      "string",
      "null"
     ]
    },
    "state": {
     "enum": [
      "observed",
      "estimated"
     ],
     "description": "observed: stated by the source; estimated: the source's own estimate or a bound, or a single grade C source. Forecasts are never exported here."
    },
    "grade": {
     "enum": [
      "A",
      "B",
      "C",
      null
     ]
    },
    "source_url": {
     "type": "string"
    },
    "quote": {
     "type": "string"
    },
    "header_quote": {
     "type": [
      "string",
      "null"
     ],
     "description": "A table row's header: the quote is then a row of that table and this its caption and header cells, both verbatim from one table"
    },
    "method": {
     "type": [
      "string",
      "null"
     ]
    },
    "coder_model": {
     "type": [
      "string",
      "null"
     ]
    },
    "coder_provider": {
     "type": [
      "string",
      "null"
     ]
    },
    "prompt_version": {
     "type": [
      "string",
      "null"
     ]
    },
    "public": {
     "type": "boolean",
     "description": "Shown on the public pages and counted in their statistics: the second-model check confirmed it, or it is unchecked with a source graded A or B outside the weak fields (who pays, first market, commercial revenue, distributor, supplier), which need a confirmed check. Other values are exported for review only."
    },
    "check": {
     "enum": [
      "confirmed",
      "rejected",
      "unsure",
      "unchecked"
     ],
     "description": "The latest verdict of the second model's check of the quote against the value"
    }
   },
   "required": [
    "measure",
    "year",
    "value",
    "period",
    "basis",
    "state",
    "source_url",
    "quote",
    "public"
   ],
   "additionalProperties": false
  }
 }
}