Public
Edited
May 29, 2023
Insert cell
Insert cell
seattleInfo = FileAttachment("Tract_Data.geojson");
Insert cell
seattleData = seattleInfo.json()
Insert cell
printTable(seattleData)
Insert cell
vl.markGeoshape()
.data(vl.json(seattleData).property('features'))
.encode(
vl.color().fieldQ('properties.Trees Per Acre').title('Tree Density')
)
.project(vl.projection('mercator'))
.width(500).height(700).render()
Insert cell
viewof y_metric = Inputs.select(['properties.Fatality Collision', 'properties.Injury Collision', 'properties.Property Damage Only Collision', 'properties.Serious Injury Collision'], {label: "Select one"})
Insert cell
vl.markPoint()
.data(vl.json(seattleData).property("features"))
.title("Trees vs. Crashes")
.encode(
vl.x().fieldQ('properties.Trees Per Acre').title("Trees Per Acre"),
vl.y().fieldQ(y_metric).title(y_metric) // add in y encoding
)
.render()

Insert cell
import {printTable} from "@jonfroehlich/data-utilities"
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