Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

World Map with D3.js!

Public visualization

World Map with D3.js!

1 star31🌍 Public
SSonuSriN
Last edited Apr 3, 2022
Created on Mar 30, 2022

This example shows a simple world map rendered as an SVG, with countries filled in green and a blue sphere background. Hovering over a country highlights it in orange. It uses d3.geoPath with the d3.geoEquirectangular projection to draw the map, and TopoJSON’s feature method to convert country boundaries from the world-atlas dataset. The code selects the SVG element, appends a sphere path, then joins country features to path elements.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed