toronto_map = VegaLite({
"width": 800,
"height": 500,
"background": "#d1d3d4",
"projection": {
"type": "mercator"
},
"layer": [
{
"data": {
"values": neighbourhood_map,
"format": {
"type": "topojson",
"feature": "toronto"
}
},
"mark": {
"type": "geoshape",
"fill": "#ebebeb",
"stroke": "#d7d7d7",
"strokeWidth": 1.5,
}
},
{
data: {
values: crime_filtered,
},
mark: "circle",
encoding: {
longitude: {
field: "Long",
type: "quantitative"
},
latitude: {
field: "Lat",
type: "quantitative"
},
size: {value: 7},
color: {
field: "MCI",
title: "Crime Type",
type: "nominal"
},
tooltip: [
{
field: "occurrencehour", title: "Occurence Hour",type: "nominal"
},
]
}
}
]
})