Skip to main content
100%

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

✓ Published0🌍 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
MIT Licensed

Similar vizzes