dashboard = {
const map = vl.markGeoshape({fill: "#ddd", stroke: "#fff", strokeWidth: 1})
.data(vl.topojson(topo).feature("chicago_neighborhoods"));
const circlesOfCrimes = vl.markCircle()
.data(crimes)
.encode(
vl.latitude().fieldQ('Latitude'),
vl.longitude().fieldQ('Longitude'),
vl.color().field('Primary Type')
)
const bar = vl.markBar()
.data(crimes)
.encode(
vl.x().field('Primary Type'),
vl.y().count('IUCR').title(null),
vl.color().fieldN('Primary Type')
)
.title('Number of Crimes by Type')
.width(width*0.30)
.height(200)
const markLine = vl.markLine()
.data(crimes)
.encode(
vl.x().fieldT('Date').timeUnit('monthdate'),
vl.y().count('IUCR').title(null),
vl.color().fieldN('Primary Type')
)
.title('Number of Crimes by Day')
.width(width*0.30)
.height(150)
return vl.hconcat(
vl.layer(map, circlesOfCrimes)
.project(vl.projection('transverseMercator').rotate([90, 40.5]))
.width(width*0.40)
.height(500)
, vl.vconcat(bar,markLine)).resolve({scale: {size: 'independent'}})
.render()
}