Interactive plot for Malmö, homepage

API
{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "data": {
    "url": "https://datagraphics.dckube.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 <= 20"
    }
  ],
  "width": 450,
  "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": "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 2021-11-25T14:34:02.106Z
Created 2021-11-25T09:31:15.040Z

DataGraphics 0.12.5