{
  "version": "xarts.coordinate-marks/1",
  "family": "coordinate-marks",
  "provenance": {
    "legacyId": "voronoi"
  },
  "document": {
    "textOverflow": "preserve",
    "header": {
      "title": "Spatial Clusters",
      "subtitle": "25 sites in four groups, each with the area closest to it"
    },
    "footer": {
      "source": "xarts · demo data",
      "notes": "25 illustrative sites in a unit domain. Each cell holds the positions closest to its site in the drawing; its area does not represent the value. The value modulates opacity. Hiding a category recomputes the partition among the visible sites."
    },
    "spacing": {
      "horizontalPadding": 24,
      "topPadding": 22,
      "bottomPadding": 16,
      "minimumTextGap": 4
    }
  },
  "presentation": {
    "theme": "anlak",
    "dimensions": {
      "width": 800,
      "height": 480
    },
    "locale": "en-US",
    "fonts": "reference",
    "surface": "theme",
    "framePadding": 24
  },
  "output": {
    "filename": "voronoi",
    "embedSpec": true,
    "geometryDecimals": 2
  },
  "operation": "nearest-site-partition",
  "data": {
    "sites": [
      {
        "id": "v1",
        "label": "v1",
        "x": 0.85,
        "y": 0.5,
        "group": "Alpha",
        "value": 23
      },
      {
        "id": "v2",
        "label": "v2",
        "x": 0.135,
        "y": 0.166,
        "group": "Beta",
        "value": 60
      },
      {
        "id": "v3",
        "label": "v3",
        "x": 0.537,
        "y": 0.926,
        "group": "Gamma",
        "value": 97
      },
      {
        "id": "v4",
        "label": "v4",
        "x": 0.65,
        "y": 0.304,
        "group": "Delta",
        "value": 43
      },
      {
        "id": "v5",
        "label": "v5",
        "x": 0.286,
        "y": 0.538,
        "group": "Alpha",
        "value": 80
      },
      {
        "id": "v6",
        "label": "v6",
        "x": 0.823,
        "y": 0.705,
        "group": "Beta",
        "value": 26
      },
      {
        "id": "v7",
        "label": "v7",
        "x": 0.37,
        "y": 0.05,
        "group": "Gamma",
        "value": 63
      },
      {
        "id": "v8",
        "label": "v8",
        "x": 0.317,
        "y": 0.853,
        "group": "Delta",
        "value": 100
      },
      {
        "id": "v9",
        "label": "v9",
        "x": 0.712,
        "y": 0.423,
        "group": "Alpha",
        "value": 46
      },
      {
        "id": "v10",
        "label": "v10",
        "x": 0.282,
        "y": 0.41,
        "group": "Beta",
        "value": 83
      },
      {
        "id": "v11",
        "label": "v11",
        "x": 0.675,
        "y": 0.874,
        "group": "Gamma",
        "value": 29
      },
      {
        "id": "v12",
        "label": "v12",
        "x": 0.649,
        "y": 0.05,
        "group": "Delta",
        "value": 66
      },
      {
        "id": "v13",
        "label": "v13",
        "x": 0.183,
        "y": 0.684,
        "group": "Alpha",
        "value": 12
      },
      {
        "id": "v14",
        "label": "v14",
        "x": 0.706,
        "y": 0.545,
        "group": "Beta",
        "value": 49
      },
      {
        "id": "v15",
        "label": "v15",
        "x": 0.351,
        "y": 0.288,
        "group": "Gamma",
        "value": 86
      },
      {
        "id": "v16",
        "label": "v16",
        "x": 0.443,
        "y": 0.937,
        "group": "Delta",
        "value": 32
      },
      {
        "id": "v17",
        "label": "v17",
        "x": 0.874,
        "y": 0.185,
        "group": "Alpha",
        "value": 69
      },
      {
        "id": "v18",
        "label": "v18",
        "x": 0.167,
        "y": 0.486,
        "group": "Beta",
        "value": 15
      },
      {
        "id": "v19",
        "label": "v19",
        "x": 0.643,
        "y": 0.642,
        "group": "Gamma",
        "value": 52
      },
      {
        "id": "v20",
        "label": "v20",
        "x": 0.487,
        "y": 0.213,
        "group": "Delta",
        "value": 89
      },
      {
        "id": "v21",
        "label": "v21",
        "x": 0.202,
        "y": 0.857,
        "group": "Alpha",
        "value": 35
      },
      {
        "id": "v22",
        "label": "v22",
        "x": 0.95,
        "y": 0.437,
        "group": "Beta",
        "value": 72
      },
      {
        "id": "v23",
        "label": "v23",
        "x": 0.252,
        "y": 0.328,
        "group": "Gamma",
        "value": 18
      },
      {
        "id": "v24",
        "label": "v24",
        "x": 0.544,
        "y": 0.695,
        "group": "Delta",
        "value": 55
      },
      {
        "id": "v25",
        "label": "v25",
        "x": 0.658,
        "y": 0.224,
        "group": "Alpha",
        "value": 92
      }
    ]
  },
  "encoding": {
    "groups": [
      {
        "id": "Alpha",
        "label": "Alpha",
        "color": "blue"
      },
      {
        "id": "Beta",
        "label": "Beta",
        "color": "teal"
      },
      {
        "id": "Gamma",
        "label": "Gamma",
        "color": "emerald"
      },
      {
        "id": "Delta",
        "label": "Delta",
        "color": "amber"
      }
    ],
    "units": {
      "x": "X",
      "y": "Y",
      "value": "Value"
    }
  },
  "calculation": {
    "xDomain": {
      "source": "provided",
      "values": [
        0,
        1
      ]
    },
    "yDomain": {
      "source": "provided",
      "values": [
        0,
        1
      ]
    },
    "metric": "display-euclidean",
    "duplicates": "reject-coincident-sites",
    "visibility": "recompute-partition",
    "intensity": {
      "mapping": "linear",
      "domain": [
        10,
        100
      ],
      "baseOpacity": 0.3,
      "multiplierRange": [
        0.5,
        1.6
      ],
      "outside": "reject"
    }
  },
  "layout": {
    "margin": {
      "top": 24,
      "right": 24,
      "bottom": 24,
      "left": 24
    },
    "legend": {
      "visible": true,
      "automaticWidth": false,
      "fullLabels": true
    }
  },
  "marks": {
    "cells": {
      "stroke": "surface",
      "strokeWidth": 2,
      "hoverOpacity": 0.6
    },
    "sites": {
      "radius": 3,
      "stroke": "surface",
      "strokeWidth": 1
    }
  },
  "annotations": []
}
