vl.markGeoshape({stroke: 'white', strokeWidth: 1})
.data(vl.topojson(belgium).feature('municipalities'))
.transform(
vl.lookup('properties.nis').default(0).from(vl.data(caseData).key('NIS5').fields('CASES')),
vl.calculate('datum.CASES == "<5" ? 0 : datum.CASES').as('Cases'),
vl.calculate('1000 * datum["Cases"] / datum.properties.population').as('cases_per_1000'),
)
.encode(
vl.color().fieldQ('cases_per_1000').legend({title: 'Cases per 1000 inhabitants', orient: 'top'}),
vl.tooltip([
{field: "properties.name_nl", title: 'City'},
{field: "CASES", title: 'cases'}
])
)
.width(850).height(600)
.config({view: {stroke: null}})
.render();