Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Map

Public visualization

Viewing a saved revision (read-only)

4d6a54e7848b4c4ba83b3edc98c78279

Fork of Map

0 stars0🌍 Public
AAmrit Adhikari
Last edited Oct 30, 2025
Created on Oct 30, 2025
Forked from Map

This example demonstrates two static maps rendered with D3 v7: a world map using the Natural Earth projection and a map of Nepal using the Mercator projection. Both visualizations load country boundaries from the `world-atlas@2` TopoJSON dataset, which is converted to GeoJSON via `topojson.feature` and drawn with `d3.geoPath`. The world map includes a graticule and a sphere background, while the Nepal map filters features by country ID 524 and fits the projection to that geometry. The code uses `d3.geoNaturalEarth1`, `d3.geoMercator`, and `projection.fitSize` to position the maps within their SVG containers.

AI-generated description