Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 6 task 1

Public visualization

Viewing a saved revision (read-only)

6f4a400e7c8e4dc2b3bc838cc8ece74f

Activity 6 task 1

0 stars0🌍 Public
RRishabh Sharma
Last edited Apr 5, 2024
Created on Apr 5, 2024
Forked from Making a Bar Chart

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 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.