Skip to main content
100%

Let's make a world map with D3.js!

✓ Published1🌍 Public
AAnthony-coding
Last edited Nov 27, 2019
Created on Nov 27, 2019

This example shows a world map rendered as an SVG, with countries drawn as filled paths and an ocean background. It uses D3.js v5 with the `geoNaturalEarth1` projection and `geoPath` to generate the geographic shapes. Country boundaries come from the TopoJSON `world-atlas` dataset, loaded via the `json` method and converted with `topojson.feature`. The code appends each country as a separate `path` element, styled with a brown fill and black stroke.

AI-generated description
MIT Licensed

Similar vizzes