Skip to main content
100%

Let's make a map with D3.js!

✓ Published1🌍 Public
Cchaimmaeee
Last edited Nov 25, 2020
Created on Nov 25, 2020

This example demonstrates how to create a simple world map using D3.js, displaying countries as light green polygons against a blue sphere background. The visualization uses the `geoNaturalEarth1` projection and `geoPath` to generate SVG paths from TopoJSON data loaded from the world-atlas dataset. The code relies on D3 v5 and the topojson library, specifically using the `feature` function to convert TopoJSON to GeoJSON. The map is rendered entirely with SVG elements, with the sphere outline drawn first, followed by the country boundaries.

AI-generated description
MIT Licensed

Similar vizzes