Relative copy number of SARS-CoV-2 to PPMoV in various municipalities in Uppsala and Stockholm region, wastewater page

API
{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "config": {
    "view": {
      "stroke": null
    }
  },
  "data": {
    "url": "https://datagraphics.dc.scilifelab.se/api/dataset/0ac8fa02871745048491de74e5689da9.csv"
  },
  "encoding": {
    "color": {
      "condition": {
        "field": "channel",
        "param": "hover",
        "title": "Municipality",
        "type": "nominal"
      },
      "value": "grey"
    },
    "opacity": {
      "condition": {
        "param": "hover",
        "value": 1
      },
      "value": 0.2
    },
    "x": {
      "field": "week",
      "title": "Week",
      "type": "nominal"
    },
    "y": {
      "field": "relative_copy_number",
      "title": "Relative copy number of SARS-CoV-2 to PMMoV",
      "type": "quantitative"
    }
  },
  "height": 250,
  "layer": [
    {
      "description": "transparent layer to make it easier to trigger selection",
      "mark": {
        "point": {
          "filled": true,
          "size": 80
        },
        "stroke": "transparent",
        "strokeWidth": 8,
        "tooltip": true,
        "type": "line"
      },
      "params": [
        {
          "name": "hover",
          "select": {
            "fields": [
              "channel"
            ],
            "on": "mouseover",
            "type": "point"
          },
          "value": [
            {
              "channel": "Enköping"
            }
          ]
        }
      ]
    },
    {
      "mark": "line"
    }
  ],
  "transform": [
    {
      "filter": "datum.channel=='Tierp'|datum.channel=='Östhammar'|datum.channel=='Enköping'|datum.channel=='Älvkarleby'|datum.channel=='Ekerö'|datum.channel=='Vaxholm'|datum.channel=='Österåker'|datum.channel=='Knivsta'"
    },
    {
      "sort": [
        {
          "field": "week",
          "order": "descending"
        }
      ],
      "window": [
        {
          "as": "rank",
          "op": "rank"
        }
      ]
    },
    {
      "filter": "datum.rank <= 90"
    }
  ],
  "width": 550
}
Owner: arnold
Modified 2021-11-26T15:22:44.482Z
Created 2021-11-26T15:16:31.035Z

DataGraphics 1.0.4