{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "A heatmap showing risk levels based on impact and likelihood with labeled risks.",
"width": 250,
"height": 250,
"data": {
"values": [
{
"impact": "Very High",
"likelihood": "Very High",
"risk": 5,
"risk_name": "Cyber"
},
{
"impact": "Very High",
"likelihood": "High",
"risk": 4,
"risk_name": "Fraud"
},
{
"impact": "Very High",
"likelihood": "Medium",
"risk": 3,
"risk_name": "Fire"
},
{
"impact": "Very High",
"likelihood": "Low",
"risk": 2,
"risk_name": "Supply"
},
{
"impact": "Very High",
"likelihood": "Very Low",
"risk": 1,
"risk_name": ""
},
{
"impact": "High",
"likelihood": "Very High",
"risk": 4,
"risk_name": "Theft"
},
{
"impact": "High",
"likelihood": "High",
"risk": 3,
"risk_name": "Power"
},
{
"impact": "High",
"likelihood": "Medium",
"risk": 2,
"risk_name": "Water"
},
{
"impact": "High",
"likelihood": "Low",
"risk": 1,
"risk_name": ""
},
{
"impact": "High",
"likelihood": "Very Low",
"risk": 1,
"risk_name": ""
},
{
"impact": "Medium",
"likelihood": "Very High",
"risk": 3,
"risk_name": "Legal"
},
{
"impact": "Medium",
"likelihood": "High",
"risk": 2,
"risk_name": "Market"
},
{
"impact": "Medium",
"likelihood": "Medium",
"risk": 1,
"risk_name": "HR"
},
{
"impact": "Medium",
"likelihood": "Low",
"risk": 1,
"risk_name": ""
},
{
"impact": "Medium",
"likelihood": "Very Low",
"risk": 1,
"risk_name": ""
},
{
"impact": "Low",
"likelihood": "Very High",
"risk": 2,
"risk_name": "Vendor"
},
{
"impact": "Low",
"likelihood": "High",
"risk": 1,
"risk_name": ""
},
{
"impact": "Low",
"likelihood": "Medium",
"risk": 1,
"risk_name": ""
},
{
"impact": "Low",
"likelihood": "Low",
"risk": 1,
"risk_name": ""
},
{
"impact": "Low",
"likelihood": "Very Low",
"risk": 1,
"risk_name": ""
},
{
"impact": "Very Low",
"likelihood": "Very High",
"risk": 1,
"risk_name": ""
},
{
"impact": "Very Low",
"likelihood": "High",
"risk": 1,
"risk_name": ""
},
{
"impact": "Very Low",
"likelihood": "Medium",
"risk": 1,
"risk_name": ""
},
{
"impact": "Very Low",
"likelihood": "Low",
"risk": 1,
"risk_name": ""
},
{
"impact": "Very Low",
"likelihood": "Very Low",
"risk": 1,
"risk_name": ""
}
]
},
"mark": "rect",
"encoding": {
"x": {
"field": "likelihood",
"type": "ordinal",
"sort": [
"Very Low",
"Low",
"Medium",
"High",
"Very High"
]
},
"y": {
"field": "impact",
"type": "ordinal",
"sort": [
"Very High",
"High",
"Medium",
"Low",
"Very Low"
]
},
"color": {
"field": "risk",
"type": "quantitative",
"scale": {
"domain": [
1,
5
],
"range": [
"green",
"yellow",
"orange",
"red"
]
},
"legend": {
"title": "Risk Level"
}
}
},
"layer": [
{
"mark": "rect"
},
{
"mark": {
"type": "text",
"baseline": "middle",
"align": "center"
},
"encoding": {
"text": {
"field": "risk_name",
"type": "nominal",
"condition": {
"test": "datum.risk_name !== ''",
"value": {
"expr": "datum.risk_name"
}
}
},
"color": {
"condition": {
"test": "datum.risk >= 3",
"value": "white"
},
"value": "black"
}
}
}
]
}