Cumulative plot, small

API
Dataset
Other graphics for same dataset
Cumulative serology test numbers 2021-09-16T07:50:12.403Z
Total serology test numbers 2021-01-13T11:35:56.173Z
Weekly serology test numbers 2021-08-30T12:16:50.202Z
{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "data": {
    "url": "https://datagraphics.dckube.scilifelab.se/api/dataset/6d6f551abc10413a97a6ab64ebac46bd.csv"
  },
  "width": 450,
  "height": 150,
  "transform": [
    {
      "sort": [
        {
          "field": "week"
        }
      ],
      "window": [
        {
          "op": "sum",
          "field": "count",
          "as": "cumulative_count"
        }
      ],
      "groupby": [
        "class"
      ],
      "frame": [
        null,
        0
      ]
    }
  ],
  "mark": {
    "type": "line",
    "tooltip": true,
    "point": {
      "filled": false,
      "fill": "white"
    }
  },
  "encoding": {
    "x": {
      "title": "Week",
      "field": "week",
      "type": "nominal",
      "axis": {
        "labelOverlap": "parity"
      }
    },
    "y": {
      "title": "Cumulative number of tests",
      "field": "cumulative_count",
      "type": "quantitative"
    },
    "color": {
      "field": "class",
      "type": "nominal",
      "scale": {
        "domain": [
          "R&D",
          "negative",
          "positive"
        ],
        "range": [
          "#c7c7c7",
          "#8fd7f9",
          "#ef9292"
        ]
      },
      "legend": {
        "title": "Test results"
      }
    }
  }
}
Owner: arnold
Modified 2021-11-25T12:01:22.567Z
Created 2021-01-12T15:32:42.735Z

DataGraphics 0.12.5