Skip to main content
100%

practice12 make a map

✓ Published1🌍 Public
DDi Cui
Last edited May 21, 2023
Created on May 21, 2023
Forked from practice1

This example shows an interactive world map that uses D3.js to render countries as SVG paths from TopoJSON data. The map displays country boundaries and names, with countries colored light green and highlighted in red on hover. It uses d3.geoNaturalEarth1 for the map projection, d3.geoPath for path generation, and d3.zoom to enable panning and zooming. Country names are loaded from a TSV file and matched to map features via ISO codes. The code also fetches world-atlas TopoJSON data for the country geometry, demonstrating basic data loading and DOM manipulation with D3.

AI-generated description

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

MIT Licensed

Similar vizzes