Weekly 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"
  },
  "transform": [
    {
      "calculate": "if(datum.class === 'positive', 0, if(datum.class === 'negative', 1, 2))",
      "as": "classOrder"
    },
    {
      "calculate": "if(datum.class === 'R&D', 'R&D*', datum.class)",
      "as": "classUpdated"
    }
  ],
  "width": 800,
  "height": 250,
  "mark": {
    "type": "bar"
  },
  "encoding": {
    "x": {
      "title": "Week",
      "field": "week",
      "type": "nominal",
      "axis": {
        "labelAngle": 0
      }
    },
    "y": {
      "title": "Number of tests",
      "field": "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"
      }
    },
    "order": {
      "field": "classOrder",
      "type": "nominal"
    },
    "tooltip": [
      {
        "field": "week",
        "type": "nominal",
        "title": "Week"
      },
      {
        "field": "classUpdated",
        "type": "nominal",
        "title": "Test result"
      },
      {
        "field": "count",
        "type": "quantitative",
        "title": "Number of tests"
      }
    ]
  }
}
Owner: arnold
Modified 2020-11-20T11:01:43.897Z
Created 2020-10-14T14:39:09.395Z

DataGraphics version 0.7.8