Skip to main content
100%

Fork of Making a bar chart

✓ Published0🌍 Public
AAbdouEnsaj
Last edited Jul 27, 2022
Created on Jul 27, 2022
Forked from Making a bar chart

This bar chart displays the population of the top 10 most populous countries, using 2018 estimates from the United Nations World Population Prospects. The chart orders countries vertically by name and encodes population as horizontal bar lengths, with a formatted x-axis labeled "Population" and a title at the top. Built with D3 v5, the code uses `d3.scaleLinear` for the x-axis, `d3.scaleBand` for the y-axis, and `d3.axisBottom` and `d3.axisLeft` for axes, while rendering all elements as SVG. Data is loaded from a CSV file and multiplied by 1000 to reflect actual population figures.

AI-generated description

This bar chart shows population of the top 10 most populous countries. The data comes from the year 2018 estimate in United Nations: World Population Prospects 2017. It also demonstrates customization of D3 axes.

See also the first bar chart visualization that this one builds on: Making a Bar Chart.

MIT Licensed

Similar vizzes