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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more