Sharanya Sriram
✓ Published0🌍 Public
This example visualizes the states of India, coloring each one with a categorical color scale and labeling it with its name. It loads TopoJSON data from a remote source, converts it to GeoJSON using `topojson.feature`, and renders the state boundaries as SVG paths via `d3.geoPath` with a `geoMercator` projection. The color assignment uses `d3.scaleOrdinal` and `schemeCategory10`, while state names are placed at path centroids. A black stroke outlines each state, with text labels sized at 8 pixels.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed