Follow ______ on twitter.

5.4.5 Communicating and Applying Simulation Insights

Code

Vega-Lite Chart

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "description": "Risk Analysis Dashboard",
  "width": 400,
  "height": 300,
  "data": {
    "values": [
      {
        "scenario": "Baseline",
        "probability": 0.5,
        "impact": 3,
        "risk": 1.5
      },
      {
        "scenario": "Worst Case",
        "probability": 0.2,
        "impact": 5,
        "risk": 1
      },
      {
        "scenario": "Best Case",
        "probability": 0.3,
        "impact": 1,
        "risk": 0.3
      }
    ]
  },
  "layer": [
    {
      "mark": {
        "type": "bar",
        "cornerRadius": 5
      },
      "encoding": {
        "x": {
          "field": "scenario",
          "type": "nominal",
          "axis": {
            "labelAngle": 0
          }
        },
        "y": {
          "field": "risk",
          "type": "quantitative"
        },
        "color": {
          "field": "scenario",
          "type": "nominal",
          "scale": {
            "scheme": "blues"
          },
          "legend": null
        },
        "tooltip": [
          {
            "field": "scenario",
            "type": "nominal"
          },
          {
            "field": "probability",
            "type": "quantitative",
            "format": ".2f"
          },
          {
            "field": "impact",
            "type": "quantitative",
            "format": ".1f"
          },
          {
            "field": "risk",
            "type": "quantitative",
            "format": ".2f"
          }
        ]
      }
    },
    {
      "mark": {
        "type": "text",
        "dy": -10
      },
      "encoding": {
        "x": {
          "field": "scenario",
          "type": "nominal"
        },
        "y": {
          "field": "risk",
          "type": "quantitative"
        },
        "text": {
          "field": "risk",
          "type": "quantitative",
          "format": ".2f"
        }
      }
    }
  ],
  "title": "Risk Assessment by Scenario"
}