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)

ca2218d2a308449ea9d16a3c1988530c

Let's make a map with D3.js!

0 stars0🌍 Public
AAndrewTsai0406
Last edited Oct 2, 2020
Created on Sep 29, 2020

This example demonstrates how to create a world map using D3.js v5 and TopoJSON. It renders a natural Earth projection of countries as SVG paths, with a blue sphere background and green country fill. The code loads geospatial data from the world-atlas package, converts TopoJSON features using `topojson.feature`, and applies a `d3.geoPath` generator with `d3.geoNaturalEarth1` projection. The map is drawn by appending path elements to an SVG container, with styling defined in an external stylesheet.

AI-generated description