Viewing a saved revision (read-only)
a419c85091a54971847d475c5e52f4ce
Activity 6 task 1
This horizontal bar chart visualizes the populations of the world’s 20 most populous countries, ranging from China’s 1.37 billion down to the Democratic Republic of the Congo’s 64.6 million. Each steel-blue bar’s length is proportional to population, with countries ordered alphabetically along the vertical axis. The D3.js v7 code loads CSV data, multiplies the raw figures by 1,000 to reflect actual counts, and uses `d3.scaleBand` and `d3.scaleLinear` to position bars, while `d3.axisBottom` formats ticks with a custom tick label function that converts large numbers into billions.
AI-generated descriptionThis 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.