{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {
"url": "https://datagraphics.dc.scilifelab.se/api/dataset/6d6f551abc10413a97a6ab64ebac46bd.csv"
},
"width": 450,
"height": 150,
"transform": [
{
"sort": [
{
"field": "week"
}
],
"window": [
{
"op": "sum",
"field": "count",
"as": "cumulative_count"
}
],
"groupby": [
"class"
],
"frame": [
null,
0
]
}
],
"mark": {
"type": "line",
"tooltip": true,
"point": {
"filled": false,
"fill": "white"
}
},
"encoding": {
"x": {
"title": "Week",
"field": "week",
"type": "nominal",
"axis": {
"labelAngle": 90,
"labelOverlap": "parity"
}
},
"y": {
"title": "Cumulative number of tests",
"field": "cumulative_count",
"type": "quantitative"
},
"color": {
"field": "class",
"type": "nominal",
"scale": {
"domain": [
"R&D",
"negative",
"positive"
],
"range": [
"#c7c7c7",
"#8fd7f9",
"#ef9292"
]
},
"legend": {
"title": "Test results"
}
}
}
}