Relative copy number of SARS-CoV-2 to PPMoV in various municipalities in Sweden

API
{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "data": {
    "url": "https://datagraphics.dc.scilifelab.se/api/dataset/0ac8fa02871745048491de74e5689da9.csv"
  },
  "height": 250,
  "transform": [
    {
      "calculate": "datum.gene_copy_number/1000000000000000000",
      "as": "gene_copy_number_div"
    },
    {
      "window": [
        {
          "op": "rank",
          "as": "rank"
        }
      ],
      "sort": [
        {
          "field": "week",
          "order": "descending"
        }
      ]
    },
    {
      "filter": "datum.rank <= 184"
    }
  ],
  "encoding": {
    "x": {
      "field": "week",
      "type": "nominal",
      "title": "Week"
    },
    "y": {
      "field": "relative_copy_number",
      "type": "quantitative",
      "title": "Relative copy number of SARS-CoV-2 to PMMoV, %"
    },
    "color": {
      "condition": {
        "param": "hover",
        "field": "channel",
        "type": "nominal",
        "title": "Municipality"
      },
      "value": "grey"
    },
    "opacity": {
      "condition": {
        "param": "hover",
        "value": 1
      },
      "value": 0.2
    }
  },
  "layer": [
    {
      "description": "transparent layer to make it easier to trigger selection",
      "params": [
        {
          "name": "hover",
          "value": [
            {
              "channel": "Uppsala"
            }
          ],
          "select": {
            "type": "point",
            "fields": [
              "channel"
            ],
            "on": "mouseover"
          }
        }
      ],
      "mark": {
        "type": "line",
        "strokeWidth": 8,
        "stroke": "transparent",
        "tooltip": true,
        "point": {
          "filled": true,
          "size": 80
        }
      }
    },
    {
      "mark": "line"
    }
  ],
  "config": {
    "view": {
      "stroke": null
    }
  }
}
Owner: arnold
Modified 2021-09-15T14:46:07.440Z
Created 2021-04-16T11:00:47.305Z

DataGraphics 1.0.4