I'm having fun playing with D3.js.
I found my data for US states from this site. I converted them with ogr2ogr and topojson. To install these tools install gdal (on a mac brew install gdal
) and npm install -g topojson
.
I found direction from Mike Bostock's helpful mapping tutorial.
The following should work: $ ogr2ogr -f GeoJSON states.json foo.shp ; topojson --id-property su_a3 -p name=NAME -p name -o usa.json state.json
where foo.shp
indicates a shapefile.