Activity 8 Country
✓ Published0🌍 Public
This example displays a map of India using geographic data from the world-atlas TopoJSON dataset. It extracts the India feature from the countries collection, then renders the country’s outline as an SVG path. The visualization uses D3 v5’s `d3.json` to load the data, `topojson.feature` to convert the TopoJSON geometry, and a `d3.geoMercator` projection fitted to the map’s dimensions via `fitSize`. The resulting path is drawn with `d3.geoPath`, producing a simple, projected country boundary.
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.
MIT Licensed