Number of patients who received the diagnoses Z86.1A or U08.9, divided by age and sex

API
{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "data": {
    "url": "https://datagraphics.dc.scilifelab.se/api/dataset/6b24d7130bef4bf78f567d9c9ad96f59.csv"
  },
  "transform": [
    {
      "filter": "datum.diagnosis_code=='Z86.1A/U08.9'"
    },
    {
      "filter": "datum.sex!='all'"
    }
  ],
  "width": 300,
  "height": 250,
  "mark": {
    "type": "bar"
  },
  "encoding": {
    "x": {
      "title": "Age group",
      "field": "age_group",
      "type": "nominal",
      "axis": {
        "labelAngle": 0
      }
    },
    "y": {
      "title": "Number of patients who received the diagnoses",
      "field": "number_of_patients",
      "type": "quantitative"
    },
    "color": {
      "field": "sex",
      "type": "nominal"
    },
    "tooltip": [
      {
        "field": "age_group",
        "type": "nominal",
        "title": "Age group"
      },
      {
        "field": "sex",
        "type": "nominal",
        "title": "Sex"
      },
      {
        "field": "number_of_patients",
        "type": "quantitative",
        "title": "Number of patients who received the diagnoses"
      }
    ]
  }
}
Owner: arnold
Modified 2021-07-08T12:30:01.190Z
Created 2021-07-08T12:26:22.790Z

DataGraphics 1.0.4