Skip to main content
100%

Fork of map with legend

✓ Published1🌍 Public
SSnapika
Last edited Mar 31, 2022
Created on Mar 31, 2022
Forked from map with legend

This example displays a choropleth map of Indian states, with each state’s color encoding its area value through a sequential rainbow scale. The map is rendered as SVG using React and D3. The code loads TopoJSON data for Indian states, converts it to GeoJSON with `topojson.feature`, and projects it with `geoMercator` and `d3.geoPath`. A `d3.scaleSequential` with `d3.interpolateRainbow` assigns colors based on the `AREA_` property, while the legend is prepared but not rendered.

AI-generated description

Making map in react d3 method 1

MIT Licensed

Similar vizzes