Published
Edited
Aug 12, 2021
Importers
1 star
Stateblock component
Insert cell
Insert cell
// Create a grid of states
position = grid`
, , , , , , , , ,VT,NH,ME
WA,ID,MT,ND,MN,WI,MI, ,NY,MA,RI,
OR,NV,WY,SD,IA,IN,OH,PA,NJ,CT, ,
CA,UT,CO,NE,MO,IL,WV,DC,MD,DE, ,
,AZ,NM,KS,AR,TN,KY,VA,NC, , ,
, , ,OK,LA,MS,AL,GA,SC, , ,
AK,HI, ,TX, , , , , ,FL, ,US`
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
gridWidth = d3.max(position, ([, [i]]) => i) + 1
Insert cell
gridHeight = d3.max(position, ([, [, j]]) => j) + 1
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import { serialize } from "@mbostock/saving-svg"
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