Cumulative serology test numbers

API

Dataset does not exist, or view access to it is not allowed.

{
  "$schema": "https://vega.github.io/schema/vega-lite/v4.json",
  "data": {
    "url": "https://datagraphics.dckube.scilifelab.se/api/dataset/d2a2477324314e8783edaf40622b911c.csv"
  },
  "width": 800,
  "height": 250,
  "transform": [
    {
      "sort": [
        {
          "field": "week"
        }
      ],
      "window": [
        {
          "op": "sum",
          "field": "count",
          "as": "cumulative_count"
        }
      ],
      "groupby": [
        "class"
      ],
      "frame": [
        null,
        0
      ]
    },
    {
      "calculate": "if(datum.class === 'R&D', 'R&D*', datum.class)",
      "as": "classUpdated"
    }
  ],
  "mark": {
    "type": "line",
    "point": {
      "filled": false,
      "fill": "white"
    }
  },
  "encoding": {
    "x": {
      "title": "Week",
      "field": "week",
      "type": "nominal",
      "axis": {
        "labelAngle": 0
      }
    },
    "y": {
      "title": "Cumulative number of tests",
      "field": "cumulative_count",
      "type": "quantitative",
      "axis": {
        "orient": "right"
      }
    },
    "color": {
      "field": "classUpdated",
      "type": "nominal",
      "scale": {
        "domain": [
          "R&D*",
          "negative",
          "positive"
        ],
        "range": [
          "#c7c7c7",
          "#8fd7f9",
          "#ef9292"
        ]
      },
      "legend": {
        "title": "Test results"
      }
    },
    "tooltip": [
      {
        "field": "week",
        "type": "nominal",
        "title": "Week"
      },
      {
        "field": "classUpdated",
        "type": "nominal",
        "title": "Test result"
      },
      {
        "field": "cumulative_count",
        "type": "quantitative",
        "title": "Cumulative number of tests"
      }
    ]
  }
}
Owner: arnold
Modified 2020-11-20T11:02:04.062Z
Created 2020-10-14T14:42:50.064Z

DataGraphics version 0.7.8