Public
Edited
Jun 14
Insert cell
Insert cell
file = FileAttachment("india_state.geojson").json();
Insert cell
{
let div = d3.create("div");
var width = 1000;
var height = 800;
var svg = div.append("svg").attr("height", height).attr("width", width);

var projection = d3.geoEquirectangular().fitExtent([[0,0],[width, height]], file);
var geoGenerator = d3.geoPath().projection(projection);
var geoPath = svg.append('path').attr('d', geoGenerator(file)).attr("stroke","yellow").attr("fill", "#4A148C");
return div.node();
}
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