Activity 8 Country
✓ Published0🌍 Public
This example displays a map of India rendered as an SVG path, centered and scaled using a Mercator projection. The code loads world country boundaries from the World Atlas TopoJSON dataset via `d3.json`, extracts India’s geometry with `topojson.feature`, and fits it to a 960×500 viewport using `d3.geoMercator().fitSize`. A single path drawn with `d3.geoPath` visualizes the country’s outline. The visualization demonstrates loading external JSON, filtering TopoJSON features, and projecting geographic data entirely with D3 v5.
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