Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Lets make a world map with D3.js

Public visualization

Lets make a world map with D3.js

0 stars1🌍 Public
NNeepaB
Last edited Dec 21, 2020
Created on Dec 21, 2020

This example shows a natural Earth projection world map, with countries filled in light green against a dark blue sphere, rendered as SVG paths. The code uses D3 v5’s `d3.geoNaturalEarth1` projection and `d3.geoPath` to generate the country outlines, while the TopoJSON library’s `feature` method extracts country geometries from the world-atlas dataset hosted at unpkg. The map is displayed on a 960x500 SVG canvas, with strokes added to differentiate country borders.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed