Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
Mmariamy
Last edited Sep 18, 2019
Created on Sep 18, 2019

A D3.js bar chart visualizes population data from a CSV file, with each country represented by a rectangle. The example demonstrates fundamental DOM manipulation by loading data with `d3.csv`, scaling values with `d3.scaleLinear` and `d3.scaleBand`, and appending SVG `rect` elements. The chart renders horizontally, with bar widths proportional to population values. The code also includes a separate, commented-out smiley face example, but the active visualization focuses solely on the bar chart, displaying five countries with varying population sizes.

AI-generated description

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

MIT Licensed

Similar vizzes