Skip to main content
100%

Let's make a Map with simplified code!

✓ Published1🌍 Public
CChristine Lanser
Last edited Oct 6, 2020
Created on Oct 6, 2020

This example shows a world map rendered as SVG paths, with countries filled in light green and the ocean sphere in blue. The code uses D3 v5's `geoNaturalEarth1` projection and `geoPath` to convert geographic data into SVG path strings, while TopoJSON's `feature` method transforms the TopoJSON world-atlas dataset into GeoJSON features for rendering. A data join appends one path per country, and the map is loaded asynchronously via `d3.json` from a remote unpkg URL.

AI-generated description

DOM manipulation to make Map

MIT Licensed

Similar vizzes