Public
Edited
Jan 23
9 forks
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
data.view()
Insert cell
Insert cell
Insert cell
Insert cell
data
.orderby('danceability')
.view(10)
Insert cell
Insert cell
data
.orderby(aq.desc('danceability'))
.view(10)
Insert cell
Insert cell
Insert cell
data.orderby(aq.desc("danceability")).select("year", "danceability").view(10)
Insert cell
Insert cell
data.orderby(aq.desc("danceability")).select(1, 4).view(5)
Insert cell
Insert cell
data
.orderby(aq.desc('danceability'))
.select(aq.not('mode'))
.view(5)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
data
.derive({
dancing_vocals: (d) => 0.8 * d.danceability + 0.2 * d.instrumentalness
})
.orderby(aq.desc("dancing_vocals"))
.select(1, 3, 6, 14)
.view(10)
Insert cell
Insert cell
data
.groupby("key")
.rollup({
mean_danceability: (d) => op.mean(d.danceability),
mean_instrumental: (d) => op.mean(d.instrumentalness),
mean_dancing_vocals: (d) =>
op.mean(0.8 * d.danceability + 0.8 * d.instrumentalness),
count: op.count()
})
.filter((d) => d.count === 10)
.orderby(aq.desc("mean_instrumental"))
.view(12)
Insert cell
Insert cell
Insert cell
viewof data_tidy = data
.fold(aq.range("acousticness", "popularity"), {
as: ["attributes", "values"]
})
.view(5)
Insert cell
data_tidy.groupby("attributes").count().orderby("attributes").view(10)
Insert cell
data_tidy.groupby("year").pivot("attributes", "values").view(5)
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