Public
Edited
Feb 21, 2024
Insert cell
Insert cell
Insert cell
seattleZipCodes = FileAttachment("zip-codes-2015.geojson").json()
Insert cell
vl.markGeoshape()
.data(seattleZipCodes.features)
.project(vl.projection(select))
.render()
Insert cell
vl.markGeoshape()
.data(seattleZipCodes.features)
.project(vl.projection(select).reflectY(true))
.encode(
vl.color().fieldO('properties.GEOID10').title('Seattle ZipCode').legend({columns: 3, symbolLimit: 50})
)
.render()
Insert cell
viewof select = Inputs.select(projections, {label: "Select one"})
Insert cell
Insert cell
topoJson = FileAttachment("City_Clerk_Neighborhoods.topojson").json()
Insert cell
vl.markGeoshape()
.data(vl.topojson(topoJson).feature('City_Clerk_Neighborhoods'))
.project(vl.projection('identity').reflectY(true))
.encode(
vl.color().fieldN('properties.S_HOOD').title('Seattle Neighborhoods').legend({columns: 3, symbolLimit: 150})
)
.width(600)
.height(600)
.render()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
projections = ['naturalEarth1',
'albers',
'azimuthalEqualArea',
'azimuthalEquidistant',
'conicConformal',
'conicEqualArea',
'conicEquidistant',
'equirectangular',
'identity',
'gnomonic',
'mercator',
'orthographic',
'stereographic',
'transverseMercator']
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