Published
Edited
Aug 9, 2019
6 stars
Insert cell
Insert cell
Insert cell
contourSvg = {
const svg = d3.create("svg").attr("width", 1000).attr("height", 1000);

const color = d3.scaleSequential(d3.interpolateOrRd)
.domain([0, 1])

svg.append("g")
.attr("fill", "none")
.attr("stroke-opacity", "0")
.attr("stroke-linejoin", "round")
.selectAll("path")
.data(contours)
.enter().append("path")
.attr("d", d3.geoPath())
.style("fill", d => color(d.value))
return svg.node();
}
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