Published
Edited
Oct 4, 2022
Insert cell
Insert cell
Insert cell
Insert cell
artistQuery = (await fetch("https://musicbrainz.org/ws/2/artist/?query=artist:queen%20AND%20country:GB%20AND%20NOT%20type:person&fmt=json")).json()
Insert cell
Insert cell
artists = artistQuery.artists
Insert cell
Insert cell
Insert cell
Insert cell
table(
artists.slice(0, 10).map(
({ name, disambiguation, type, country, shortForecast }) => ({
Name: md`**${name}**`,
Disambiguation: md`**${disambiguation}**`,
Type: md`**${type}**`,
Country: md`**${country}**`,
})
)
)
Insert cell
Insert cell
Insert cell
vl
.markBar()
.data(artists)
.encode(
vl.y().fieldN('name').sort(null),
vl.x().scale({domain: [0, 105]}).fieldQ('score'),
vl.color().fieldN('type')
)
.render()
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

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