Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

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

Public visualization

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

0 stars1๐ŸŒ 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

Comments

Sign in to join the discussion.

MIT Licensed