Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

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

Public visualization

Viewing a saved revision (read-only)

508d1056a69a45a393538341310b8a44

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

0 stars2🌍 Public
NNita
Last edited Nov 24, 2020
Created on Nov 24, 2020

This example renders a choropleth-style map of all US counties as light green SVG paths with subtle black borders. It uses D3 v5’s `geoAlbersUsa` projection and `geoPath` generator to convert TopoJSON county boundaries from the `us-atlas` dataset into scalable vector graphics. The code loads the TopoJSON via `d3.json`, extracts features with `topojson.feature`, and binds them to SVG path elements, while styling is handled with CSS class selectors.

AI-generated description