Vega-Lite — retention cohort heatmap
Cohort retention rectangle heatmap.
Rendering…
Make it your own.
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {"values": [
{"cohort":"Jan","week":0,"r":100},{"cohort":"Jan","week":1,"r":68},{"cohort":"Jan","week":2,"r":55},
{"cohort":"Feb","week":0,"r":100},{"cohort":"Feb","week":1,"r":72},{"cohort":"Feb","week":2,"r":58},
{"cohort":"Mar","week":0,"r":100},{"cohort":"Mar","week":1,"r":74},{"cohort":"Mar","week":2,"r":63}
]},
"mark":"rect",
"encoding": {
"x":{"field":"week","type":"ordinal"},
"y":{"field":"cohort","type":"nominal"},
"color":{"field":"r","type":"quantitative","scale":{"scheme":"blues"}}
}
}