Published
Edited
Sep 15, 2018
1 fork
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
LambertCanada = {
// Width supplied by Observable.
const height = 600;
// Create and select SVG
const svg = d3.select(DOM.svg(width, height));
const padding = 20;
const projection = d3.geoConicConformal()
.parallels([49, 77])
// Rotate along x-axis
.rotate([91.86667, 0])
.fitExtent([[padding, padding], [width-padding, height-padding]], canadaJson);
const path = d3.geoPath()
.projection(projection);
svg.selectAll("path")
.data(canadaJson.features)
.enter().append("path")
.attr("d", path);

return svg.node();
}
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