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)

c1a8b3a9d15648d39f929df9567f62d6

Let's make a map with D3.js

0 stars0🌍 Public
JJake
Last edited Jul 15, 2020
Created on Jul 15, 2020

This example renders a world map as light green SVG paths with black borders on a pink background. It loads geographic data from the World Atlas TopoJSON file via the `json` method, converts TopoJSON to GeoJSON using the `feature` function from Topojson, and projects the coordinates with `geoMercator`. The map is drawn using D3’s `geoPath` to generate path data for each country, which is then appended to the SVG. The code demonstrates basic geographic projection and TopoJSON handling without interactive features.

AI-generated description