Export Image
Export Code

Fork of React Starter

Nita

0 views in last 90 days
Last edited Feb 25, 2025
Created on Feb 25, 2025
Forked from React Starter

D3.js Map of India in React

This project displays an interactive map of India using:

  • React for the UI framework
  • D3.js for data visualization and map rendering
  • TopoJSON for parsing map data

Features

  • Interactive state highlighting on hover
  • Tooltips showing state names
  • Responsive design that works on different screen sizes
  • Proper code organization with separate component and utility files

Data Source

The map uses GeoJSON data for India's states from the deldersveld/topojson repository.

Project Structure

  • index.js: Main entry point that renders the App component
  • components/IndiaMap.js: React component for the India map
  • utils/mapUtils.js: D3.js utility functions for rendering the map

How to Run

  1. Install dependencies: npm install
  2. Build the project: npm run build
  3. Open the index.html file in a browser
MIT Licensed