{
  "$id": "https://schemas.mapi.dev/v1/api-ScoreSummaryTable.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "One output variable's summary as a table: the coordinate columns (one per dim), then\none column per statistic (``mean``, ``hdi_90_lower``, ...). Dates are ISO text.\n``period``: the variable is a circular output (``OutputDecl.circular``), summarised on the\ncircle (see the field). ``dims`` and ``time_dim`` say which columns are coordinates and\nwhich one is time; a server that predates them leaves both out. ``plots``: the recipe ids\nof the run's rendered plots (``plots.json``) that draw this variable, so a client can show\nthem next to the table.",
  "examples": [
    {
      "columns": [
        "geo",
        "time",
        "mean",
        "hdi_90_lower",
        "hdi_90_upper"
      ],
      "dims": [
        "geo",
        "time"
      ],
      "rows": [
        [
          "de",
          "2026-01-05",
          1520.4,
          1402.1,
          1633.9
        ]
      ],
      "time_dim": "time",
      "variable": "revenue"
    }
  ],
  "properties": {
    "columns": {
      "items": {
        "type": "string"
      },
      "maxItems": 256,
      "title": "Columns",
      "type": "array"
    },
    "dims": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "maxItems": 64,
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The coordinate columns (the leading columns); the rest are statistics",
      "title": "Dims"
    },
    "period": {
      "anyOf": [
        {
          "exclusiveMinimum": 0,
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Set for a circular output (an angle that wraps at one turn, in the output's units): the statistics are on the circle. `mean` is the circular mean, the intervals are centred on it, and every value is in [0, period). An interval with lower > upper crosses the seam (from 350 to 10 degrees)",
      "title": "Period"
    },
    "plots": {
      "anyOf": [
        {
          "items": {
            "pattern": "^[A-Za-z0-9_.\\-]{1,128}$",
            "type": "string"
          },
          "maxItems": 16,
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Recipe ids of the run's plots that draw this output (sci.area_map, core.roc_pr, ...)",
      "title": "Plots"
    },
    "rows": {
      "items": {
        "items": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "integer"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "type": "array"
      },
      "title": "Rows",
      "type": "array"
    },
    "time_dim": {
      "anyOf": [
        {
          "maxLength": 256,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The dim that is time, when there is one",
      "title": "Time Dim"
    },
    "variable": {
      "maxLength": 256,
      "title": "Variable",
      "type": "string"
    }
  },
  "required": [
    "variable",
    "columns",
    "rows"
  ],
  "title": "ScoreSummaryTable",
  "type": "object",
  "x-mapi-contract-version": "0.2"
}
