Published
Edited
May 28, 2022
Fork of D3 U.S. map
Insert cell
Insert cell
projection = d3.geoAlbersUsa().scale(1300).translate([487.5, 305])
Insert cell
path = d3.geoPath()
Insert cell
mxMap = htl.html`<svg viewBox="0 0 975 450">
<g fill="none" stroke="#000" stroke-linejoin="round" stroke-linecap="round" transform="translate(0,-300)">
<path stroke-width="1" d="${mipro(estados)}"></path>
</g>
</svg>`
Insert cell
mipro = d3.geoPath().projection(d3.geoAlbers())
Insert cell
estados = topojson.mesh(mx, mx.objects.estadosGeo, (a, b) => 1)// a === b)
Insert cell
mx = FileAttachment("estadosTopo.json").json()
Insert cell
topojson = require("topojson-client@3")
Insert cell
d3 = require("d3-geo@2")
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