Public
Edited
Apr 10, 2024
Insert cell
Insert cell
// listeningHabits = Plot.plot({
// width,
// height: 200,
// caption: "Listening habits",
// x: {
// axis: "top",
// grid: true
// },
// y: {
// grid: true,
// tickFormat: (d) => d ?? "N/A",
// label: null,
// padding: 0
// },
// marks: [
// Plot.dot(
// data,
// Plot.dodgeY({
// anchor: "middle",
// padding: -0.5,
// x: "time",
// fill: "black",
// fillOpacity: 0.8,
// r: 1.4,
// sort: { channel: "x" }
// })
// )
// ]
// })

Insert cell
Insert cell
// distributionAcrossTime(distributionAcrossTimeFacetBy)
Insert cell
// albumTracksPlot("Degeneración Nacional")
Insert cell
bubbleAcrossTime("La Plebada")
Insert cell
// cumulativeListens("La Banda Baston", "albumName")
Insert cell
// cumulativeListens("Yoga Fire", "albumName")
Insert cell
// cumulativeListens(top5, "artist")
Insert cell
// cumulativeListens(top5Albums.slice(0, 7), "albumName")
Insert cell
beeswarmCounts(data, top5, "time")
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
Insert cell
top5Albums = [
"De Lo Más Solicitado",
"Degeneración Nacional",
"Homie Alone",
"Fuego",
"Música Prohibida",
"Un Verano Sin Ti",
"Trópico de Cáncer II",
"El Fin Del Mundo",
"Huracán",
"CÓDIGOS",
"Eclipse",
"Luces Fantasma"
]
Insert cell
// Plot.plot({
// marginLeft: 120,
// y: { label: "" },
// facet: { data: data.filter((d) => d.albumType == "album"), y: "month" },
// marks: [
// Plot.barX(
// data.filter((d) => d.albumType == "album"),
// Plot.groupY(
// { x: "count" },
// {
// y: "albumName",
// sort: { y: "x", reverse: true, limit: 5 }
// }
// )
// ),
// Plot.ruleX([0])
// ]
// })
Insert cell
Insert cell
Plot.plot({
width,
marginLeft: 100,
y: { label: "" },
marks: [
Plot.line(tempdata, {
x: "playedAt",
y: "track",
markerEnd: "circle",
curve: "step"
})
]
})
Insert cell
tempdata = data.filter((d) => d.albumName === "Homie Alone")
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