Fork of map with legend
✓ Published0🌍 Public
This example renders a choropleth map of Indian states, coloring each state by its `AREA_` attribute using a sequential rainbow color scale. The map is drawn as SVG paths via `d3.geoPath` with a `d3.geoMercator` projection fit to the window size. State boundaries come from a TopoJSON file loaded with `d3.json` and converted to GeoJSON using `topojson.feature`. React manages the component lifecycle, while `d3.scaleSequential` maps data extents to colors; a separate SVG element is prepared for a legend, though the legend itself is not implemented in the visible code.
AI-generated descriptionMaking map in react d3 method 1
MIT Licensed