Published
Edited
Aug 18, 2019
2 forks
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{
var svg = d3.select(DOM.svg(width, height));

svg.selectAll(".subunit")
.data(subunits.features)
.enter()
.append("path")
.attr("class", function(d) { return "subunit " + d.id; })
.attr("d", path);
return svg.node();
}
Insert cell
width = 1000
Insert cell
height = 590;
Insert cell
projection = d3.geoPatterson()
.center([58,54])
.scale(520)
.translate([0,0])
.precision(.1);
Insert cell
path = d3.geoPath()
.projection(projection);
Insert cell
subunits = topojson.feature(asia, asia.objects.subunits);
Insert cell
asia = fetch("https://gist.githubusercontent.com/dhoboy/ff8448ace9d5d567390a/raw/f98a7b12ec0005f72641696752a96d1ccd73ed22/asia.json").then(response => response.json())
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