ICE8-1.2
✓ Published1🌍 Public
This example renders a choropleth-style map of U.S. states using a categorical color scale based on state names. It uses D3 v5’s `d3.geoAlbersUsa` projection and `d3.geoPath` to draw state boundaries from TopoJSON data loaded from the us-atlas CDN, with state labels positioned at each polygon’s centroid. The code also applies a sequential color palette via `d3.scaleOrdinal` and `d3.schemeCategory10`, and includes hover tooltips via appended `title` elements. The map is rendered as SVG, with black stroke outlines for each state.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed