Skip to main content
100%

Fork of Making map in react d3 method 2

✓ Published0🌍 Public
AAnimesh Nautiyal
Last edited Jan 21, 2021
Created on Jan 20, 2021

This example displays an interactive map of India with state and district boundaries rendered as SVG polygons using React hooks and D3 v6. The code loads two TopoJSON files from GitHub Gists via `d3.json` and converts them with `topojson.feature`. A `geoMercator` projection and `geoPath` generator draw the map shapes, while React’s `useEffect` and `useRef` manage the D3 selections. The visualization updates when the bundled data arrives, filling polygons with a teal color.

AI-generated description

Making map in react d3 method 2

MIT Licensed

Similar vizzes