Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a map with D3.js!

Public visualization

Let's make a map with D3.js!

0 stars1🌍 Public
Cchaimmaeee
Last edited Nov 26, 2020
Created on Nov 26, 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

Comments

Sign in to join the discussion.

MIT Licensed