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 stars0🌍 Public
NNithish Kumar
Last edited Mar 29, 2023
Created on Mar 29, 2023

This example displays a world map using the Natural Earth projection, with countries rendered as light green SVG paths and the ocean as a blue sphere. It loads geographic data from the World Atlas TopoJSON file, converting it to GeoJSON with the topojson `feature` function. The code uses D3 v5’s `geoNaturalEarth1` projection, `geoPath` for path generation, and `selectAll` to bind country features to SVG elements.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed