Published
Edited
Oct 5, 2022
Insert cell
Insert cell
Insert cell
Insert cell
universityQuery = (await fetch("https://services2.arcgis.com/5I7u4SJE1vUr79JC/arcgis/rest/services/UniversityChapters_Public/FeatureServer/0/query?where=1%3D1&outFields=*&outSR=4326&f=json")).json()
Insert cell
Insert cell
university = universityQuery.features
Insert cell
Insert cell
Insert cell
Insert cell
table(
university.slice(0, 15).map(
({ attributes, attributes2, attributes3, attributes4 }) => ({
Object_ID: md`**${attributes.OBJECTID}**`,
University_Chapter: md`**${attributes.University_Chapter}**`,
City: md`**${attributes.City}**`,
State: md`**${attributes.State}**`,
})
)
)
Insert cell
Insert cell

vl
.layer(
// vl.markArc(),
vl.markBar(),
)
.data(university)
.encode(
// vl.theta().aggregate('count').fieldQ('attributes.State').stack(true),
// vl.color().fieldN('attributes.State').type('Nominal').title('State'),
vl.y().fieldN('attributes.State').sort(null),
vl.x().scale({domain: [0, 8]}).aggregate('count').fieldQ('attributes.State'),
vl.color().fieldN('attributes.City')
)
.render()
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