Skip to main content
100%

Let's make a map with D3.js

✓ Published2🌍 Public
YYanan Xin
Last edited Feb 24, 2020
Created on Feb 23, 2020

This example demonstrates how to create a world map using D3.js version 5 and TopoJSON. It uses `d3.geoBonne` as the map projection and `d3.geoPath` to generate SVG paths for country boundaries. The map loads geographic data from the World Atlas TopoJSON file (110m resolution) and renders each country as a pink SVG path with black outlines. A sphere outline is drawn around the map using a simple GeoJSON Sphere object, while CSS styles control the fill and stroke appearance.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes