{
"$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=='U09.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 diagnosis",
"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 diagnosis"
}
]
}
}