🌍 Public
Viewing a saved revision (read-only)
2de6a54bb80848b7ab2835d9f6d0f9c7
Activity 8 Country
This example displays a map of India using a Mercator projection, rendered as an SVG path. It loads country boundary data from the world-atlas TopoJSON file hosted on jsDelivr, then extracts India’s geometry with `topojson.feature`. The code uses `d3.geoMercator` and `d3.geoPath` to project and draw the shape, fitting it to a 960×500 viewport via `fitSize`.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.