Public
Edited
Jun 14, 2024
Insert cell
Insert cell
users.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
country-by-continent.json
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
join = {
return u.map((row) => {
const match = c.find((x) => x.country === row.Country);
if (match) {
return {
...row,
...match
};
}
return row;
});
}
Insert cell
join
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
join
SELECT continent, SUM(Users) AS sum FROM "join" GROUP BY continent;
Insert cell
Plot.plot({
marginLeft: 50,
marks: [Plot.barY(aggregate, { x: "continent", y: "sum" })],
x: {
label: "Continent"
},
y: {
label: "Sum"
}
})
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