Skip to main content
100%

Let's make a face with D3.js!

✓ Published1🌍 Public
TTheRoadSign
Last edited Nov 25, 2019
Created on Nov 25, 2019

This example demonstrates fundamental DOM manipulation with D3.js by loading population data from a CSV file and rendering each country as a static SVG rectangle. The code uses `d3.csv` to fetch and parse the data, converts population values to numbers, and applies `selectAll` with `enter().append('rect')` to create 300x300 pixel squares. While the title suggests an interactive smiley face with moving eyebrows, the visible script only logs the parsed data and appends rectangles, with no facial features or animation logic implemented.

AI-generated description

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

MIT Licensed

Similar vizzes