crime_area = {
const area = vl.markGeoshape({fill: 'gray'})
.data(vl.topojson(topo).feature('chicago_neighborhoods'))
const circles = vl.markCircle()
.data(crimes)
.encode(
vl.latitude().fieldQ('Latitude'),
vl.longitude().fieldQ('Longitude'),
vl.color().fieldN('Primary Type').scale(colors),
vl.opacity().if(highlight, vl.value(1)).value(0.1),
vl.tooltip([{field: 'Primary Type'}, {field: 'Date', type: 'temporal', format: '%d/%m/%y - [%H:%M]'}])
)
return vl.layer(area, circles)
.project(vl.projection('transverseMercator').rotate([90, 90]))
.title("Crimes in Chicago")
.width(width/2).height(height)
}