Skip to main content
100%

Let's make a map with D3.js!

✓ Published0🌍 Public
DDukatino
Last edited Sep 9, 2020
Created on Sep 9, 2020

This example shows a simple orthographic world map rendered as an SVG, with countries filled in light green and a blue sphere representing the globe. It uses D3 v5’s `geoOrthographic` projection and `geoPath` to draw country boundaries from TopoJSON data loaded from the world-atlas dataset. The code appends a sphere path, then fetches the TopoJSON file, converts it to GeoJSON with the `feature` function from the topojson library, and binds the resulting country features to SVG paths.

AI-generated description
MIT Licensed

Similar vizzes