Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of map with legend

Public visualization

Viewing a saved revision (read-only)

c0f4a002c41644be93b18b0c482d9103

Fork of map with legend

0 stars1🌍 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