Published
Edited
Mar 28, 2020
4 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof v = rangeSlider(crime_filtered, d=>d.occurrencehour)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
toronto_map = VegaLite({
"width": 800,
"height": 500,
"background": "#d1d3d4",
"projection": {
"type": "mercator"
},
"layer": [
{
// data for displaying the map
"data": {
"values": neighbourhood_map,
"format": {
"type": "topojson",
"feature": "toronto"
}
},
"mark": {
"type": "geoshape",
"fill": "#ebebeb",
"stroke": "#d7d7d7",
"strokeWidth": 1.5,
}
},
{
// displaying crimes on the map
data: {
values: crime_filtered,
},
mark: "circle",
encoding: {
longitude: {
field: "Long",
type: "quantitative"
},
latitude: {
field: "Lat",
type: "quantitative"
},
// marker style
size: {value: 7},
color: {
field: "MCI",
title: "Crime Type",
type: "nominal"
},
tooltip: [
{
field: "occurrencehour", title: "Occurence Hour",type: "nominal"
},
]
}
}
]
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more