Skip to main content
100%

Interactive map?!

✓ Published0🌍 Public
Ggorfoula
Last edited Jul 28, 2020
Created on Jul 22, 2020
Forked from Let's make a map?!

This example shows a single green country from a world atlas dataset, rendered with the D3.js geoPath and geoMercator projection onto an SVG canvas. The map is interactive, as the entire graphic responds to zoom gestures through D3’s zoom handler, which updates the group transform. The underlying data comes from the world-atlas countries-50m JSON, loaded via d3.json and processed with topojson’s feature function. Hovering over the country path changes its fill to black via CSS. Only one country path is drawn, as the commented-out code for all features remains inactive.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

MIT Licensed

Similar vizzes