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
mp = vanPopCleaned2.filter(function(nhood) {
return nhood.Area == "Mount Pleasant"});
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
vegalite({
data: {values: vanPopCleaned2},
mark: "tick",
encoding: {
x: {field: "Population", "type": "quantitative"}
}
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
popCrimeView = embedWithSpecificVersions({
"name": "crimePop",
"data":
{
"name": "crime",
"values": vanCrimeCleaned
},
"transform": [
{
"lookup": "NEIGHBOURHOOD",
"from":
{
"data": {"values": populations},
"key": "Area",
"fields": ["Population"]
}
}],
"mark": {
"type": "bar",
"clip": true
},
"encoding": {
"x": {
"aggregate": "count",
"field": "Offense",
"type": "quantitative",
"scale": {
"zero": false,
"domain": [0,80000]
}
},
"y": {
"field": "NEIGHBOURHOOD",
"type": "nominal",
"scale": {"rangeStep": 15}
},
"color":
{
"type": "quantitative",
"field": "Population",
"scale": {
//"domain": [0,9000000,18000000],
"round": true,
"type": "linear",
//"range": ["#8AB9ED", "#acbdbb","#FDB813"]
}
}
}
})
Insert cell
Insert cell
Insert cell
vega_explicit({
"name": "trellis_crime",
"data": {"values": vanCrime2},
"mark": {
"type": "point",
"clip": true
},
"columns": 2,
"encoding": {
"facet": {
"field": "NEIGHBOURHOOD",
"type": "ordinal",
"sort": {"op": "count", "field": "NEIGHBOURHOOD"}
},
"x": {
"aggregate": "count",
"field": "NEIGHBOURHOOD",
"type": "quantitative",
"scale": {
"zero": false,
"domain": [0,9000]
}
},
"y": {
"field": "Offense",
"type": "nominal",
"scale": {"rangeStep": 12}
},
"color": {"field": "Offense Type", "type": "nominal"}
},
"resolve": {"axis": {"x": "independent", "y": "independent"}}
})


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