Fork of Fork of Fork of Map of India - States and Union Territories
This interactive map of India displays states and union territories as color-coded, clickable SVG paths, using a Mercator projection created with `d3.geoMercator` and rendered through `d3.geoPath`. Built with React and D3.js, it loads GeoJSON data from a GitHub repository, enabling users to hover for tooltips, click for state details, and zoom or pan using `d3.zoom`. The map distinguishes regions by color and includes animated label resizing during zoom interactions.
AI-generated descriptionIndia Map Visualization
This visualization displays an interactive map of India showing all states and union territories.
Features
- Color-coded states and union territories
- Interactive hover effects with tooltips
- Click to select states and view detailed information
- Zoom and pan functionality
- Responsive design for different screen sizes
- State information panel with details about each region
Data Source
The map uses GeoJSON format data from: https://raw.githubusercontent.com/geohacker/india/master/state/india_state.geojson
Technology
- React
- D3.js for visualization and interactivity
- GeoJSON for map data
How to Use
- Hover over any state to see its name in a tooltip
- Click on a state to select it and view detailed information
- Zoom in/out using the buttons or mouse wheel
- Pan the map by clicking and dragging
Project Structure
App.jsx- Main React componentIndiaMap.jsx- Map visualization componentstyles.css- All styling for the application
Accessibility
The visualization includes keyboard navigation and appropriate contrast ratios for text readability.
Browser Compatibility
Tested and working on the latest versions of Chrome, Firefox, Safari, and Edge.
Future Improvements
- Adding more detailed data for each state/UT
- Implementing choropleth visualization for various metrics
- Adding time-series data visualization
- Improving mobile experience with touch-optimized interactions