{
  "version": "xarts.value-matrix/1",
  "family": "value-matrix",
  "provenance": {
    "legacyId": "cohortretention"
  },
  "measurement": {
    "exportText": "glyph-advances",
    "interactiveText": "shaped"
  },
  "marks": {
    "opacity": 1
  },
  "labels": {
    "visible": true
  },
  "annotations": [],
  "document": {
    "header": {
      "title": "Customer Retention",
      "subtitle": "Monthly cohort retention rates over 12 months"
    },
    "footer": {
      "source": "xarts · demo data",
      "notes": "Illustrative data to explore the chart and replace with your own."
    },
    "spacing": {
      "horizontalPadding": 24,
      "topPadding": 22,
      "bottomPadding": 16,
      "minimumTextGap": 4
    },
    "notes": []
  },
  "output": {
    "filename": "cohortretention-margin-quality",
    "embedSpec": true,
    "geometryDecimals": 2
  },
  "presentation": {
    "theme": "anlak",
    "dimensions": {
      "width": 800,
      "height": 480
    },
    "locale": "en-US",
    "fonts": "reference",
    "surface": "theme",
    "framePadding": 24
  },
  "operation": "cohort-retention",
  "data": {
    "rows": [
      {
        "id": "cohortretention-0-0",
        "cohort": "Jan",
        "period": 0,
        "value": 100
      },
      {
        "id": "cohortretention-0-1",
        "cohort": "Jan",
        "period": 1,
        "value": 84.3
      },
      {
        "id": "cohortretention-0-2",
        "cohort": "Jan",
        "period": 2,
        "value": 69.6
      },
      {
        "id": "cohortretention-0-3",
        "cohort": "Jan",
        "period": 3,
        "value": 56
      },
      {
        "id": "cohortretention-0-4",
        "cohort": "Jan",
        "period": 4,
        "value": 44.3
      },
      {
        "id": "cohortretention-0-5",
        "cohort": "Jan",
        "period": 5,
        "value": 35.1
      },
      {
        "id": "cohortretention-0-6",
        "cohort": "Jan",
        "period": 6,
        "value": 28.3
      },
      {
        "id": "cohortretention-0-7",
        "cohort": "Jan",
        "period": 7,
        "value": 23.3
      },
      {
        "id": "cohortretention-0-8",
        "cohort": "Jan",
        "period": 8,
        "value": 19.7
      },
      {
        "id": "cohortretention-0-9",
        "cohort": "Jan",
        "period": 9,
        "value": 16.7
      },
      {
        "id": "cohortretention-0-10",
        "cohort": "Jan",
        "period": 10,
        "value": 14.1
      },
      {
        "id": "cohortretention-0-11",
        "cohort": "Jan",
        "period": 11,
        "value": 11.6
      },
      {
        "id": "cohortretention-1-0",
        "cohort": "Feb",
        "period": 0,
        "value": 100
      },
      {
        "id": "cohortretention-1-1",
        "cohort": "Feb",
        "period": 1,
        "value": 85.5
      },
      {
        "id": "cohortretention-1-2",
        "cohort": "Feb",
        "period": 2,
        "value": 71.5
      },
      {
        "id": "cohortretention-1-3",
        "cohort": "Feb",
        "period": 3,
        "value": 58.4
      },
      {
        "id": "cohortretention-1-4",
        "cohort": "Feb",
        "period": 4,
        "value": 47.2
      },
      {
        "id": "cohortretention-1-5",
        "cohort": "Feb",
        "period": 5,
        "value": 38.5
      },
      {
        "id": "cohortretention-1-6",
        "cohort": "Feb",
        "period": 6,
        "value": 32.1
      },
      {
        "id": "cohortretention-1-7",
        "cohort": "Feb",
        "period": 7,
        "value": 27.4
      },
      {
        "id": "cohortretention-1-8",
        "cohort": "Feb",
        "period": 8,
        "value": 23.7
      },
      {
        "id": "cohortretention-1-9",
        "cohort": "Feb",
        "period": 9,
        "value": 20.6
      },
      {
        "id": "cohortretention-1-10",
        "cohort": "Feb",
        "period": 10,
        "value": 17.6
      },
      {
        "id": "cohortretention-1-11",
        "cohort": "Feb",
        "period": 11,
        "value": null
      },
      {
        "id": "cohortretention-2-0",
        "cohort": "Mar",
        "period": 0,
        "value": 100
      },
      {
        "id": "cohortretention-2-1",
        "cohort": "Mar",
        "period": 1,
        "value": 86.2
      },
      {
        "id": "cohortretention-2-2",
        "cohort": "Mar",
        "period": 2,
        "value": 72.5
      },
      {
        "id": "cohortretention-2-3",
        "cohort": "Mar",
        "period": 3,
        "value": 59.9
      },
      {
        "id": "cohortretention-2-4",
        "cohort": "Mar",
        "period": 4,
        "value": 49.4
      },
      {
        "id": "cohortretention-2-5",
        "cohort": "Mar",
        "period": 5,
        "value": 41.3
      },
      {
        "id": "cohortretention-2-6",
        "cohort": "Mar",
        "period": 6,
        "value": 35.4
      },
      {
        "id": "cohortretention-2-7",
        "cohort": "Mar",
        "period": 7,
        "value": 31
      },
      {
        "id": "cohortretention-2-8",
        "cohort": "Mar",
        "period": 8,
        "value": 27.4
      },
      {
        "id": "cohortretention-2-9",
        "cohort": "Mar",
        "period": 9,
        "value": 24
      },
      {
        "id": "cohortretention-2-10",
        "cohort": "Mar",
        "period": 10,
        "value": null
      },
      {
        "id": "cohortretention-2-11",
        "cohort": "Mar",
        "period": 11,
        "value": null
      },
      {
        "id": "cohortretention-3-0",
        "cohort": "Apr",
        "period": 0,
        "value": 100
      },
      {
        "id": "cohortretention-3-1",
        "cohort": "Apr",
        "period": 1,
        "value": 85.9
      },
      {
        "id": "cohortretention-3-2",
        "cohort": "Apr",
        "period": 2,
        "value": 72.2
      },
      {
        "id": "cohortretention-3-3",
        "cohort": "Apr",
        "period": 3,
        "value": 59.9
      },
      {
        "id": "cohortretention-3-4",
        "cohort": "Apr",
        "period": 4,
        "value": 50
      },
      {
        "id": "cohortretention-3-5",
        "cohort": "Apr",
        "period": 5,
        "value": 42.5
      },
      {
        "id": "cohortretention-3-6",
        "cohort": "Apr",
        "period": 6,
        "value": 37
      },
      {
        "id": "cohortretention-3-7",
        "cohort": "Apr",
        "period": 7,
        "value": 32.8
      },
      {
        "id": "cohortretention-3-8",
        "cohort": "Apr",
        "period": 8,
        "value": 29.2
      },
      {
        "id": "cohortretention-3-9",
        "cohort": "Apr",
        "period": 9,
        "value": null
      },
      {
        "id": "cohortretention-3-10",
        "cohort": "Apr",
        "period": 10,
        "value": null
      },
      {
        "id": "cohortretention-3-11",
        "cohort": "Apr",
        "period": 11,
        "value": null
      },
      {
        "id": "cohortretention-4-0",
        "cohort": "May",
        "period": 0,
        "value": 100
      },
      {
        "id": "cohortretention-4-1",
        "cohort": "May",
        "period": 1,
        "value": 84.7
      },
      {
        "id": "cohortretention-4-2",
        "cohort": "May",
        "period": 2,
        "value": 70.3
      },
      {
        "id": "cohortretention-4-3",
        "cohort": "May",
        "period": 3,
        "value": 58.1
      },
      {
        "id": "cohortretention-4-4",
        "cohort": "May",
        "period": 4,
        "value": 48.7
      },
      {
        "id": "cohortretention-4-5",
        "cohort": "May",
        "period": 5,
        "value": 41.6
      },
      {
        "id": "cohortretention-4-6",
        "cohort": "May",
        "period": 6,
        "value": 36.5
      },
      {
        "id": "cohortretention-4-7",
        "cohort": "May",
        "period": 7,
        "value": 32.3
      },
      {
        "id": "cohortretention-4-8",
        "cohort": "May",
        "period": 8,
        "value": null
      },
      {
        "id": "cohortretention-4-9",
        "cohort": "May",
        "period": 9,
        "value": null
      },
      {
        "id": "cohortretention-4-10",
        "cohort": "May",
        "period": 10,
        "value": null
      },
      {
        "id": "cohortretention-4-11",
        "cohort": "May",
        "period": 11,
        "value": null
      },
      {
        "id": "cohortretention-5-0",
        "cohort": "Jun",
        "period": 0,
        "value": 100
      },
      {
        "id": "cohortretention-5-1",
        "cohort": "Jun",
        "period": 1,
        "value": 82.6
      },
      {
        "id": "cohortretention-5-2",
        "cohort": "Jun",
        "period": 2,
        "value": 67.3
      },
      {
        "id": "cohortretention-5-3",
        "cohort": "Jun",
        "period": 3,
        "value": 55
      },
      {
        "id": "cohortretention-5-4",
        "cohort": "Jun",
        "period": 4,
        "value": 45.8
      },
      {
        "id": "cohortretention-5-5",
        "cohort": "Jun",
        "period": 5,
        "value": 39
      },
      {
        "id": "cohortretention-5-6",
        "cohort": "Jun",
        "period": 6,
        "value": 33.9
      },
      {
        "id": "cohortretention-5-7",
        "cohort": "Jun",
        "period": 7,
        "value": null
      },
      {
        "id": "cohortretention-5-8",
        "cohort": "Jun",
        "period": 8,
        "value": null
      },
      {
        "id": "cohortretention-5-9",
        "cohort": "Jun",
        "period": 9,
        "value": null
      },
      {
        "id": "cohortretention-5-10",
        "cohort": "Jun",
        "period": 10,
        "value": null
      },
      {
        "id": "cohortretention-5-11",
        "cohort": "Jun",
        "period": 11,
        "value": null
      },
      {
        "id": "cohortretention-6-0",
        "cohort": "Jul",
        "period": 0,
        "value": 100
      },
      {
        "id": "cohortretention-6-1",
        "cohort": "Jul",
        "period": 1,
        "value": 80.2
      },
      {
        "id": "cohortretention-6-2",
        "cohort": "Jul",
        "period": 2,
        "value": 63.8
      },
      {
        "id": "cohortretention-6-3",
        "cohort": "Jul",
        "period": 3,
        "value": 51.3
      },
      {
        "id": "cohortretention-6-4",
        "cohort": "Jul",
        "period": 4,
        "value": 42.2
      },
      {
        "id": "cohortretention-6-5",
        "cohort": "Jul",
        "period": 5,
        "value": 35.5
      },
      {
        "id": "cohortretention-6-6",
        "cohort": "Jul",
        "period": 6,
        "value": null
      },
      {
        "id": "cohortretention-6-7",
        "cohort": "Jul",
        "period": 7,
        "value": null
      },
      {
        "id": "cohortretention-6-8",
        "cohort": "Jul",
        "period": 8,
        "value": null
      },
      {
        "id": "cohortretention-6-9",
        "cohort": "Jul",
        "period": 9,
        "value": null
      },
      {
        "id": "cohortretention-6-10",
        "cohort": "Jul",
        "period": 10,
        "value": null
      },
      {
        "id": "cohortretention-6-11",
        "cohort": "Jul",
        "period": 11,
        "value": null
      },
      {
        "id": "cohortretention-7-0",
        "cohort": "Aug",
        "period": 0,
        "value": 100
      },
      {
        "id": "cohortretention-7-1",
        "cohort": "Aug",
        "period": 1,
        "value": 77.8
      },
      {
        "id": "cohortretention-7-2",
        "cohort": "Aug",
        "period": 2,
        "value": 60.5
      },
      {
        "id": "cohortretention-7-3",
        "cohort": "Aug",
        "period": 3,
        "value": 47.9
      },
      {
        "id": "cohortretention-7-4",
        "cohort": "Aug",
        "period": 4,
        "value": 38.8
      },
      {
        "id": "cohortretention-7-5",
        "cohort": "Aug",
        "period": 5,
        "value": null
      },
      {
        "id": "cohortretention-7-6",
        "cohort": "Aug",
        "period": 6,
        "value": null
      },
      {
        "id": "cohortretention-7-7",
        "cohort": "Aug",
        "period": 7,
        "value": null
      },
      {
        "id": "cohortretention-7-8",
        "cohort": "Aug",
        "period": 8,
        "value": null
      },
      {
        "id": "cohortretention-7-9",
        "cohort": "Aug",
        "period": 9,
        "value": null
      },
      {
        "id": "cohortretention-7-10",
        "cohort": "Aug",
        "period": 10,
        "value": null
      },
      {
        "id": "cohortretention-7-11",
        "cohort": "Aug",
        "period": 11,
        "value": null
      },
      {
        "id": "cohortretention-8-0",
        "cohort": "Sep",
        "period": 0,
        "value": 100
      },
      {
        "id": "cohortretention-8-1",
        "cohort": "Sep",
        "period": 1,
        "value": 76
      },
      {
        "id": "cohortretention-8-2",
        "cohort": "Sep",
        "period": 2,
        "value": 58.2
      },
      {
        "id": "cohortretention-8-3",
        "cohort": "Sep",
        "period": 3,
        "value": 45.6
      },
      {
        "id": "cohortretention-8-4",
        "cohort": "Sep",
        "period": 4,
        "value": null
      },
      {
        "id": "cohortretention-8-5",
        "cohort": "Sep",
        "period": 5,
        "value": null
      },
      {
        "id": "cohortretention-8-6",
        "cohort": "Sep",
        "period": 6,
        "value": null
      },
      {
        "id": "cohortretention-8-7",
        "cohort": "Sep",
        "period": 7,
        "value": null
      },
      {
        "id": "cohortretention-8-8",
        "cohort": "Sep",
        "period": 8,
        "value": null
      },
      {
        "id": "cohortretention-8-9",
        "cohort": "Sep",
        "period": 9,
        "value": null
      },
      {
        "id": "cohortretention-8-10",
        "cohort": "Sep",
        "period": 10,
        "value": null
      },
      {
        "id": "cohortretention-8-11",
        "cohort": "Sep",
        "period": 11,
        "value": null
      },
      {
        "id": "cohortretention-9-0",
        "cohort": "Oct",
        "period": 0,
        "value": 100
      },
      {
        "id": "cohortretention-9-1",
        "cohort": "Oct",
        "period": 1,
        "value": 75.2
      },
      {
        "id": "cohortretention-9-2",
        "cohort": "Oct",
        "period": 2,
        "value": 57.4
      },
      {
        "id": "cohortretention-9-3",
        "cohort": "Oct",
        "period": 3,
        "value": null
      },
      {
        "id": "cohortretention-9-4",
        "cohort": "Oct",
        "period": 4,
        "value": null
      },
      {
        "id": "cohortretention-9-5",
        "cohort": "Oct",
        "period": 5,
        "value": null
      },
      {
        "id": "cohortretention-9-6",
        "cohort": "Oct",
        "period": 6,
        "value": null
      },
      {
        "id": "cohortretention-9-7",
        "cohort": "Oct",
        "period": 7,
        "value": null
      },
      {
        "id": "cohortretention-9-8",
        "cohort": "Oct",
        "period": 8,
        "value": null
      },
      {
        "id": "cohortretention-9-9",
        "cohort": "Oct",
        "period": 9,
        "value": null
      },
      {
        "id": "cohortretention-9-10",
        "cohort": "Oct",
        "period": 10,
        "value": null
      },
      {
        "id": "cohortretention-9-11",
        "cohort": "Oct",
        "period": 11,
        "value": null
      },
      {
        "id": "cohortretention-10-0",
        "cohort": "Nov",
        "period": 0,
        "value": 100
      },
      {
        "id": "cohortretention-10-1",
        "cohort": "Nov",
        "period": 1,
        "value": 75.6
      },
      {
        "id": "cohortretention-10-2",
        "cohort": "Nov",
        "period": 2,
        "value": null
      },
      {
        "id": "cohortretention-10-3",
        "cohort": "Nov",
        "period": 3,
        "value": null
      },
      {
        "id": "cohortretention-10-4",
        "cohort": "Nov",
        "period": 4,
        "value": null
      },
      {
        "id": "cohortretention-10-5",
        "cohort": "Nov",
        "period": 5,
        "value": null
      },
      {
        "id": "cohortretention-10-6",
        "cohort": "Nov",
        "period": 6,
        "value": null
      },
      {
        "id": "cohortretention-10-7",
        "cohort": "Nov",
        "period": 7,
        "value": null
      },
      {
        "id": "cohortretention-10-8",
        "cohort": "Nov",
        "period": 8,
        "value": null
      },
      {
        "id": "cohortretention-10-9",
        "cohort": "Nov",
        "period": 9,
        "value": null
      },
      {
        "id": "cohortretention-10-10",
        "cohort": "Nov",
        "period": 10,
        "value": null
      },
      {
        "id": "cohortretention-10-11",
        "cohort": "Nov",
        "period": 11,
        "value": null
      },
      {
        "id": "cohortretention-11-0",
        "cohort": "Dec",
        "period": 0,
        "value": 100
      },
      {
        "id": "cohortretention-11-1",
        "cohort": "Dec",
        "period": 1,
        "value": null
      },
      {
        "id": "cohortretention-11-2",
        "cohort": "Dec",
        "period": 2,
        "value": null
      },
      {
        "id": "cohortretention-11-3",
        "cohort": "Dec",
        "period": 3,
        "value": null
      },
      {
        "id": "cohortretention-11-4",
        "cohort": "Dec",
        "period": 4,
        "value": null
      },
      {
        "id": "cohortretention-11-5",
        "cohort": "Dec",
        "period": 5,
        "value": null
      },
      {
        "id": "cohortretention-11-6",
        "cohort": "Dec",
        "period": 6,
        "value": null
      },
      {
        "id": "cohortretention-11-7",
        "cohort": "Dec",
        "period": 7,
        "value": null
      },
      {
        "id": "cohortretention-11-8",
        "cohort": "Dec",
        "period": 8,
        "value": null
      },
      {
        "id": "cohortretention-11-9",
        "cohort": "Dec",
        "period": 9,
        "value": null
      },
      {
        "id": "cohortretention-11-10",
        "cohort": "Dec",
        "period": 10,
        "value": null
      },
      {
        "id": "cohortretention-11-11",
        "cohort": "Dec",
        "period": 11,
        "value": null
      }
    ]
  },
  "encoding": {
    "row": "cohort",
    "column": "period",
    "value": "value",
    "measure": {
      "name": "Retention",
      "unit": "%"
    }
  },
  "calculation": {
    "time": "elapsed-periods",
    "periodUnit": "months",
    "rowOrder": "input",
    "baseline": {
      "period": 0,
      "value": 100
    },
    "missing": "blank",
    "summary": "observed-post-baseline-mean"
  },
  "profile": {
    "margin": {
      "top": 39,
      "right": 60,
      "bottom": 40,
      "left": 48
    },
    "colorRange": [
      "#efe8da",
      "#112c47"
    ],
    "cellRadius": 1,
    "cellPadding": 2,
    "cellText": {
      "fill": "#0d0d0d",
      "fontSize": 10,
      "fontFamily": "'Inter', system-ui, -apple-system, sans-serif",
      "fontWeight": 500
    },
    "rowLabel": {
      "fill": "#2a2a2a",
      "fontSize": 11,
      "fontFamily": "'Inter', system-ui, -apple-system, sans-serif",
      "fontWeight": 500
    },
    "colLabel": {
      "fill": "#2a2a2a",
      "fontSize": 11,
      "fontFamily": "'Inter', system-ui, -apple-system, sans-serif",
      "fontWeight": 500
    },
    "avgLabel": {
      "fill": "#0d0d0d",
      "fontSize": 10,
      "fontFamily": "'Inter', system-ui, -apple-system, sans-serif",
      "fontWeight": 600
    }
  }
}
