Public
Edited
Dec 18, 2024
1 star
Insert cell
Insert cell
metrics = [
"Pollution",
"Health",
"Food",
"Shelter",
"Rights",
"Education",
"Climate",
"Water",
"Population",
"Energy Ecology",
"Cooperation"
]
Insert cell
url = "https://docs.google.com/spreadsheets/d/1ih4V4CumuIl5ZynobsazNzGiaPrE2V2Dpt13FI22XNU/edit#gid=0"
Insert cell
getCsvUrl = (url) => {
url = new URL(url);
const id = url.pathname.split("/")[3];
const gid = new URLSearchParams(url.hash.slice(1)).get("gid") || 0;
return `https://docs.google.com/spreadsheets/d/${id}/export?format=csv&gid=${gid}`;
}
Insert cell
data = d3.csv(getCsvUrl(url), d3.autoType)
Insert cell
import { SummaryTable } from "@observablehq/summary-table"
Insert cell
SummaryTable(data)
Insert cell
url_2 = `https://docs.google.com/spreadsheets/d/1vieItTpYDkgyDhjjvzrczWXugibwgaBKGWtBCbKjsf0/edit?gid=385089357#gid=385089357`
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