Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a face with D3.js!

Public visualization

Let's make a face with D3.js!

0 stars1🌍 Public
TTheRoadSign
Last edited Nov 25, 2019
Created on Nov 25, 2019

This example builds an animated smiley face using D3.js, demonstrating fundamental DOM manipulation with SVG elements. It loads population data from a CSV file using `d3.csv` and binds it to rectangles via `data().enter().append('rect')`, though the visual face itself is constructed from SVG shapes. The code uses D3 v5 with `select` and `csv` imports, setting fixed rectangle dimensions of 300×300 pixels. The rendered SVG is 960×500, with the face representing population values for eight countries, though the interactive eyebrow movement hinted in the README is not yet implemented in the visible code.

AI-generated description

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

Comments

Sign in to join the discussion.

MIT Licensed