Follow ______ on twitter.

8.2.5 Agent-Based Modeling for Complex Risk Scenarios

Code

Vega-Lite Chart

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "description": "Agent-based model showing disease spread",
  "data": {
    "values": [
      {
        "day": 1,
        "infected": 5
      },
      {
        "day": 2,
        "infected": 10
      },
      {
        "day": 3,
        "infected": 15
      },
      {
        "day": 4,
        "infected": 25
      },
      {
        "day": 5,
        "infected": 40
      },
      {
        "day": 6,
        "infected": 60
      },
      {
        "day": 7,
        "infected": 80
      }
    ]
  },
  "mark": "line",
  "encoding": {
    "x": {
      "field": "day",
      "type": "quantitative"
    },
    "y": {
      "field": "infected",
      "type": "quantitative"
    },
    "color": {
      "value": "#004976"
    }
  },
  "title": "Disease Spread Over Time",
  "width": 400,
  "height": 200
}