Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a map with D3.js!

Public visualization

Viewing a saved revision (read-only)

1e3ea2ba8b924df8bbacf62005d2226e

Let's make a map with D3.js!

0 stars0🌍 Public
NNitin Vadhiya
Last edited Oct 31, 2021
Created on Oct 31, 2021

This example demonstrates how to create a world map using D3.js v5, rendering country boundaries as light green SVG paths on a blue sphere. It shows a natural Earth projection with subtle black stroke outlines for each country. The visualization loads GeoJSON data from the world-atlas TopoJSON file using `d3.json`, then converts it to geographic features with `topojson.feature`. The code applies `d3.geoPath` with a `geoNaturalEarth1` projection to draw both the sphere background and individual country shapes onto the SVG canvas.

AI-generated description