mapchoro = vl.markGeoshape({stroke: '#000', strokeWidth: 1})
.data(bairros.features)
.transform(
vl.lookup('properties.NOME').from(vl.data(homicides).key('Bairro').fields('Bairro', 'Homicidios',
'perHundredThousand'))
)
.encode
(
vl.color().fieldQ('perHundredThousand').scale({type: 'quantize', clamp: true, scheme: {name: 'bluegreen', count:
8}}).title('Número de homicídios por cada 100 mil habitantes'),
vl.tooltip([
{field: 'Bairro'},
{field: 'Homicidios', title: 'Homicídios'},
{field: 'perHundredThousand', format: '.2f', title: 'Taxa de Homicídios'}
])
)
.project(vl.projection('mercator'))
.width(800).height(600)
.render()