Public
Edited
Dec 24
30 stars
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
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
world = await d3.json(
"https://cdn.jsdelivr.net/npm/world-atlas@2/countries-110m.json"
)
Insert cell
land = topojson.feature(world, world.objects.land)
Insert cell
graticule = d3.geoGraticule10()
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
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
locations = [
{
name: "European population grid 5km²",
type: "csv",
url: "https://raw.githubusercontent.com/eurostat/gridviz/master/assets/csv/Europe/pop_2018_5km.csv",
longitude: (d) => parseInt(d.x),
latitude: (d) => parseInt(d.y),
value: (d) => d.population,
nbLine: 400,
width: 1500,
overlap: 100,
projection: projection,
annotations: europeanCapitals
},
{
name: "Netherlands 100mx100m population grid",
type: "csv",
url: "https://raw.githubusercontent.com/eurostat/gridviz/master/assets/csv/Netherlands/100m/inwoner_2018.csv",
longitude: (d) => parseInt(d.x),
latitude: (d) => parseInt(d.y),
value: (d) => d.INWONER,
nbLine: 400,
width: 900,
overlap: 10,
projection: projection
},
{
name: "South America elevation",
type: "csv",
url: "https://raw.githubusercontent.com/Zechasault/elevationData/master/south-america.csv",
longitude: (d) => d.b,
latitude: (d) => d.a,
value: (d) => d.c,
nbLine: 250,
overlap: 11,
projection: d3.geoMercator()
},
{
name: "Corsica elevation",
type: "json",
url: "https://gist.githubusercontent.com/Zechasault/bf81cd3db44a21ab7eee77714c3b5775/raw/88abac60f0b3749fd47a74fed39288c0e451139b/corseElevation",
longitude: (d) => d.location.lng,
latitude: (d) => d.location.lat,
value: (d) => d.elevation,
nbLine: 144,
width: 600,
overlap: 10,
projection: d3.geoMercator()
}
]
Insert cell
pop_2018_5km.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
//ppUrl = FileAttachment("global_power_plant_database-2.csv").url()
Insert cell
// {
// name: "Power Plants of the world",
// type: "csv",
// url:
// ppUrl ,
// longitude: d => d.longitude,
// latitude: d => d.latitude,
// value: d => d.capacity_mw,
// nbLine: 400,
// width: 900,
// overlap: 100,
// projection: d3.geoNaturalEarth1()
// },
Insert cell
Insert cell
Insert cell
Insert cell
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