Fork of ICE-8
✓ Published0🌍 Public
This example shows a choropleth map of Indian states colored with a categorical scale, with each state’s name rendered at its centroid. Using d3.json to load TopoJSON data, the code applies a geoMercator projection and d3.geoPath to generate SVG paths for state boundaries. State names are positioned via pathGenerator.centroid, while a d3.scaleOrdinal assigns colors from schemeCategory10. The map updates hover effects through CSS on the `.states` class, with red strokes outlining each state.
AI-generated descriptionMIT Licensed