Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

US states map : with colorScale. One color for each country

Public visualization

US states map : with colorScale. One color for each country

1 star11🌍 Public
NNita
Last edited Dec 4, 2020
Created on Dec 4, 2020

This example displays a map of US states, each rendered as a path with a distinct color from a categorical scale. It shows how each state can be uniquely identified and visually separated using a color-coding scheme. The visualization uses D3.js version 5, specifically the `d3.geoPath` and `geoAlbersUsa` projection to draw the map, along with `scaleOrdinal` and `schemeCategory10` for coloring. It loads US state boundaries from the us-atlas 10m TopoJSON dataset and creates SVG paths with hover effects defined in CSS.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed