Skip to main content
100%

Let's make a map with D3.js

✓ Published0🌍 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
MIT Licensed

Similar vizzes