Published
Edited
Aug 8, 2021
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
vl.markCircle()
.encode(
vl.x().fieldQ("VACCED_RATIO").title("Percentage volledig gevaccineerd").axis({format:"%"}).scale({domainMin: 0.25}),
vl.y().fieldQ("INC_TOT").title("Incidentie"),
vl.size().fieldQ("POP").title("Aantal inwoners").scale({rangeMax: 1000}),
vl.color().fieldN("PROVINCE").scale({scheme: "category20"}).title("Provincie"),
vl.tooltip().field("TX_DESCR_NL")
)
.data(data)
.width(600)
.height(400)
.title("Volledig gevaccineerd vs. incidentie")
.render();
Insert cell
incomeGraph = vl.markCircle()
.encode(
vl.x().fieldQ("VACCED_RATIO").title("Percentage volledig gevaccineerd").axis({format:"%"}).scale({domainMin: 0.25}),
vl.y().fieldQ("INCOME").title("Gemiddeld inkomen"),
vl.size().fieldQ("POP").title("Aantal inwoners").scale({rangeMax: 1000}),
vl.color().fieldN("PROVINCE").scale({scheme: "category20"}).title("Provincie"),
vl.tooltip().field("TX_DESCR_NL")
)
.data(data)
.width(600)
.height(400)
.title("Gemiddeld inkomen vs. percentage volledig gevaccineerd")
.render();
Insert cell
vpp = vl.markCircle()
.encode(
vl.x().fieldQ("VACCED_RATIO").title("Percentage volledig gevaccineerd").axis({format:"%"}).scale({domainMin: 0.25}),
vl.y().fieldN("PROVINCE").title(null),
vl.size().fieldQ("POP").title("Aantal inwoners").scale({rangeMax: 1000}),
vl.color().fieldN("PROVINCE").scale({scheme: "category20"}).title("Provincie"),
vl.tooltip().field("TX_DESCR_NL")
)
.data(data)
.width(600)
.height(400)
.title("Percentage volledig gevaccineerd per gemeente")
.render();
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
vaccine_today = {
let raw = await (await fetch(`https://epistat.sciensano.be/Data/${today_url}/COVID19BE_VACC_MUNI_CUM_${today_url}.json`)).json();
const lastWeek = raw.reverse()[0].YEAR_WEEK;
raw = raw.filter(d => d.YEAR_WEEK === lastWeek && d.DOSE !== "A");
return d3.rollup(raw, v => d3.sum(v, d => d.CUMUL), d => d.NIS5);
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more