Interactive plot for Malmö, homepage

API
{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "data": {
    "url": "https://datagraphics.dc.scilifelab.se/api/dataset/65f19e61386a4a039aa798010ca42469.csv"
  },
  "transform": [
    {
      "filter": "datum.wwtp=='Sjölunda WWTP, Malmö'"
    },
    {
      "sort": [
        {
          "field": "week",
          "order": "descending"
        }
      ],
      "window": [
        {
          "as": "rank",
          "op": "rank"
        }
      ]
    },
    {
      "filter": "datum.rank <= 16"
    }
  ],
  "width": 450,
  "height": 250,
  "mark": {
    "type": "bar"
  },
  "encoding": {
    "x": {
      "title": "Week",
      "field": "week",
      "type": "nominal",
      "axis": {
        "labelAngle": 90
      }
    },
    "y": {
      "title": "N3-gene copy number per PMMoV gene copy number x 10^4",
      "field": "value",
      "type": "quantitative"
    },
    "color": {
      "field": "wwtp",
      "type": "nominal",
      "scale": {
        "domain": [
          "Sjölunda WWTP, Malmö"
        ],
        "range": [
          "#8fd7f9"
        ]
      },
      "legend": {
        "title": "Wastewater treatment plant"
      }
    },
    "tooltip": [
      {
        "field": "week",
        "type": "nominal",
        "title": "Week"
      },
      {
        "field": "wwtp",
        "type": "nominal",
        "title": "Wastewater treatment plant"
      },
      {
        "field": "value",
        "type": "quantitative",
        "title": "Relative copy number of SARS-CoV-2 to PMMoV"
      }
    ]
  }
}
Owner: arnold
Modified 2022-05-31T04:14:04.991Z
Created 2021-11-25T09:31:15.040Z

DataGraphics 1.0.4