Skip to main content
100%

Cheap Tricks with D3.js

✓ Published0🌍 Public
BBlakeMcMurray
Last edited Feb 6, 2021
Created on Feb 5, 2021

This example visualizes a world map using D3.js, rendering an interactive SVG with countries colored in light green and a blue sphere. It loads world atlas data from the `world-atlas` package, merging TopoJSON geometry with TSV metadata to display country names as tooltips. The code uses `d3.geoPath`, `d3.geoNaturalEarth1`, and `topojson.feature` to project and draw the map, while `d3.zoom` enables panning and zooming.

AI-generated description

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

MIT Licensed

Similar vizzes