Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
Vvmoharir
Last edited Nov 16, 2020
Created on Nov 16, 2020

This example uses D3.js to draw a smiley face on an SVG canvas, with interactive eyebrows that move based on user input. It demonstrates fundamental DOM manipulation by selecting SVG elements and appending paths for the face’s features. The code loads country boundaries from the World Atlas TopoJSON dataset, projects them using a Mercator projection via `d3.geoMercator` and `d3.geoPath`, and renders them as SVG paths. A video tutorial embedded in the README explains the step-by-step construction, while the live example focuses on simple, playful visualization with D3 v5.

AI-generated description

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

MIT Licensed

Similar vizzes