Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a map with D3.js and add interaction

Public visualization

Viewing a saved revision (read-only)

265c63407611426f9e02feb70f462adc

Let's make a map with D3.js and add interaction

0 stars0🌍 Public
SSherry198
Last edited May 12, 2020
Created on May 12, 2020

This example displays an interactive world map with D3.js, rendering countries as green SVG paths with black outlines over a black sphere. Hovering a country turns it dark red. It uses `d3.geoPath` with `d3.geoNaturalEarth1` for projection, `d3.zoom` for pan and zoom, and `topojson.feature` to convert TopoJSON data from the world-atlas package. Country names come from a TSV file linked by ISO code, shown as tooltips via SVG `<title>` elements.

AI-generated description