Map of India with D3
✓ Published3🌍 Public
NNita
Last edited Feb 20, 2021
Created on Feb 20, 2021
This example displays a choropleth map of India’s states, with each state filled by a categorical color and labeled with its name at the centroid. It loads TopoJSON data from a GitHub repository and renders it as SVG paths using `d3.geoPath` with a `geoMercator` projection. State names are drawn as SVG text elements positioned via `pathGenerator.centroid`. The code also applies `scaleOrdinal` with `schemeCategory10` for coloring and relies on the `topojson` library to convert the TopoJSON features.
AI-generated descriptionThe map of India - my country
MIT Licensed