Skip to main content
100%

Let's make a US map with D3.js!

✓ Published1🌍 Public
NNita
Last edited Nov 24, 2020
Created on Nov 24, 2020

This example demonstrates how to create a map of the United States using D3.js, rendering each state as a green SVG path with black strokes. The code loads county-level TopoJSON data from the us-atlas package, extracts state boundaries with topojson.feature, and projects them using the d3.geoAlbersUsa() projection. State paths are generated with d3.geoPath and appended to an SVG element, with styles defined in an accompanying CSS file. The example uses D3 v5 and relies on the geo-albers-usa-territories plugin for the projection.

AI-generated description
MIT Licensed

Similar vizzes