Unlisted
Edited
Dec 2, 2022
Insert cell
Insert cell
Insert cell
communes = {
yield await FileAttachment("communes.csv").csv({ typed: true });
}
Insert cell
countries = d3.json(
"https://gisco-services.ec.europa.eu/distribution/v2/countries/geojson/CNTR_RG_60M_2020_4326.geojson"
)
Insert cell
LAU2 = {
yield { features: [] };
yield await d3.json(
"https://gisco-services.ec.europa.eu/distribution/v2/lau/geojson/LAU_RG_01M_2020_4326.geojson"
);
}
Insert cell
{
const height = 650;
const prj = d3.geoEquirectangular().fitWidth(width, LAU2);
const svg = d3
.create("svg")
.attr("viewBox", [0, 0, width, height])
.attr("width", width)
.style("max-width", "100%")
.attr("background-color", "white");

svg
.append("g")
.selectAll("path")
.data(LAU2.features)
.join("path")
.style("fill", "none")
.style("stroke", "black")
.style("stroke-width", 0.1)
.attr("d", d3.geoPath(prj));

return svg.node();
}
Insert cell
bertin = require("bertin@1.4")
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