Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a face with D3.js

Public visualization

Viewing a saved revision (read-only)

4a0653727455414aaf7c1e6c0073c967

Let's make a face with D3.js

0 stars0🌍 Public
PpilafGB62
Last edited Jun 12, 2020
Created on Jun 12, 2020

This example displays a horizontal bar chart of country populations using D3.js, with bars rendered as SVG rectangles. The chart scales bar widths linearly against population values and positions them along a band scale for country names. The code imports specific D3 modules (`select`, `csv`, `scaleLinear`, `max`, `scaleBand`) to load data from a CSV file, parse population numbers, and bind the data to rectangle elements. Each bar’s height is set by the band scale’s bandwidth, creating a simple, clean visualization of comparative country sizes.

AI-generated description