Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

SVG Population Chart

Public visualization

SVG Population Chart

0 stars1🌍 Public
Bbprokopowicz
Last edited Mar 25, 2020
Created on Mar 25, 2020
Forked from SVG Smiley Face

This bar chart displays the population of ten countries, with horizontal bars ordered by country name along the y-axis and population values on the x-axis. It is built using the D3.js library (v5) and renders directly to an SVG element. The code employs `scaleLinear` for the quantitative population axis and `scaleBand` for the ordinal country categories, with axes generated via `axisLeft` and `axisBottom`. Data is loaded from an external `data.csv` file using D3's `csv` function, and the population values are converted to numbers before the chart is drawn.

AI-generated description

D3 course follow along.

Comments

Sign in to join the discussion.

MIT Licensed