Relative copy number of SARS-CoV-2 to PMMoV in Kalmar, wastewater page

API
{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "data": {
    "url": "https://datagraphics.dc.scilifelab.se/api/dataset/0ac8fa02871745048491de74e5689da9.csv"
  },
  "transform": [
    {
      "filter": "datum.channel=='Kalmar'"
    },
    {
      "calculate": "datum.relative_copy_number",
      "as": "relative_copy_number_total"
    },
    {
      "sort": [
        {
          "field": "week",
          "order": "descending"
        }
      ],
      "window": [
        {
          "as": "rank",
          "op": "rank"
        }
      ]
    },
    {
      "filter": "datum.rank <= 20"
    }
  ],
  "width": 550,
  "height": 250,
  "mark": {
    "type": "bar"
  },
  "encoding": {
    "x": {
      "title": "Week",
      "field": "week",
      "type": "nominal",
      "axis": {
        "labelAngle": 90
      }
    },
    "y": {
      "title": "Relative copy number of SARS-CoV-2 to PMMoV",
      "field": "relative_copy_number_total",
      "type": "quantitative"
    },
    "color": {
      "field": "channel",
      "type": "nominal",
      "scale": {
        "domain": [
          "Kalmar"
        ],
        "range": [
          "#8fd7f9"
        ]
      },
      "legend": null
    },
    "tooltip": [
      {
        "field": "week",
        "type": "nominal",
        "title": "Week"
      },
      {
        "field": "channel",
        "type": "nominal",
        "title": "Wastewater treatment plant"
      },
      {
        "field": "relative_copy_number_total",
        "type": "quantitative",
        "title": "Relative copy number of SARS-CoV-2 to PMMoV, %"
      }
    ]
  }
}
Owner: arnold
Modified 2021-11-26T15:23:19.177Z
Created 2021-11-26T15:04:39.297Z

DataGraphics 1.0.4