Public
Edited
Nov 18, 2021
Insert cell
Insert cell
vega({
$schema: "https://vega.github.io/schema/vega-lite/v4.json",
background: "white",
width: 600,
height: 600,
title: {
text: ["Nov./Dec. 2020 Spotify Canada Charts - Top 5 Tracks", ""],
fontSize: 24
},
data: { values: top5data },
mark: {
type: "line",
point: {
filled: true,
size: 60
//fill: "white"
},
tooltip: true
},

encoding: {
x: {
field: "week",
axis: { title: "Week", labelFontSize: 14, titleFontSize: 16 }
},
y: {
field: "rank",
type: "quantitative",

scale: { reverse: true, domain: [1, 200] },
axis: {
title: "Chart Ranking",
labelFontSize: 14,
titleFontSize: 16
}
},
color: {
field: "Track",
type: "nominal",
legend: {
columns: 2,
orient: "top",
labelFontSize: 12,
title: "Track",
labelLimit: 800,
titleFontSize: 16
}
}
}
})
Insert cell
top5data = FileAttachment("MMM-Spotify-Top5-Rank@3.csv").csv()
Insert cell
vega = require("vega-embed@6")
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