Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a map with D3.js

Public visualization

Let's make a map with D3.js

0 stars1🌍 Public
JJake
Last edited Jul 16, 2020
Created on Jul 16, 2020

This example visualizes world countries as an interactive SVG map using a natural Earth projection. It draws a dark blue sphere background and fills each country with light green polygons outlined in black, based on TopoJSON data from the world-atlas package. The code uses d3.geoNaturalEarth1 for projection, d3.geoPath to generate SVG paths, and topojson.feature to convert TopoJSON topology into GeoJSON features. Countries are appended as SVG path elements via D3’s data join.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed