Public
Edited
Oct 30, 2023
Paused
2 forks
2 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
// Lambert-93 as per https://geodesie.ign.fr/contenu/fichiers/Lambert93_ConiquesConformes.pdf, p.2.
proj = d3.geoConicConformal()
.parallels([44, 49])
.rotate([-3, -46.5])
.scale(3200)
.translate([width / 2, height / 2])
Insert cell
Insert cell
function drawPixi(transform) {
graphics.clear();

app.stage.scale.x = transform.k;
app.stage.scale.y = transform.k;
app.stage.position.x = transform.x;
app.stage.position.y = transform.y;
for (let i = 0, n = data.communes.length; i < n; i++) {
const d = data.communes[i];
graphics.beginFill(d.properties.color, 1);
graphics.lineStyle(communePathWidth / transform.k, 0xffffff, 1);
path(d);
graphics.endFill();
}

for (let i = 0, n = data.dep_borders.length; i < n; i++) {
const d = data.dep_borders[i];
graphics.lineStyle(depPathWidth / transform.k, 0x333c4e, 1);
path(d);
}
// const t = new PIXI.Text('Density Population\n\nFrench Metropolitan\nMunicipalities (2016)');
// t.x = 15;
// t.y = 5;
app.stage.removeChildren();
// app.stage.addChild(t);
app.stage.addChild(graphics);
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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