Public
Edited
Sep 5, 2023
Insert cell
Insert cell
Plot.plot({
width: 1000,
height: 2000,
y: {label: null},
x: {axis: "top", tickFormat: "s"},
color: {scheme: "Rainbow", legend: "ramp", width: 600, label: "Ranking metric"},
marks: [
Plot.barX(tidy, {
y: "university",
x: "score",
fill: "metric",
sort: {color: null, y: "-x"},
})
],
marginLeft: 500,
style: "font-size: 20px; color: white; background: #222222"
})
Insert cell
population = FileAttachment("THE rankings weighted.csv").csv({typed: true})
Insert cell
rankingsCSV = FileAttachment("THE rankings weighted@1.csv").csv()
Insert cell
Insert cell
tidy = rankingsCSV.columns.slice(3).flatMap(metric => rankingsCSV.map(d => ({university: d.Name, metric, score: d[metric]})))
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