capetownmap = vl
.layer(
vl
.markGeoshape({
stroke: '#grey',
strokeWidth: 0.4,
fill: 'none'
})
.data(vl.json(wards.features))
.encode(
vl
.color()
.fieldN('properties.name')
.scale({ opacity: 0.900 })
.legend(null),
vl.tooltip("properties.name")
)
.project(
vl
.projection('mercator')
.scale(14900)
.translate(-4600, -9250)
),
vl
.markSquare({ fill: '#ffa500', size: 50, opacity: 0.7 })
.data(WWTW)
.encode(
vl.tooltip([vl.fieldN('Name'), vl.fieldQ('Maximum daily capacity')]),
vl.longitude().fieldQ('Location[1]'),
vl.latitude().fieldQ('Location[0]'),
vl
.size()
.fieldQ('Maximum daily capacity')
.scale({ range: [0, 1000] })
.legend(null)
)
.project(
vl
.projection('mercator')
.scale(14900)
.translate(-4600, -9250)
)
)
.config({ view: { stroke: null } })
.render()