Fork of Making a Bar Chart
This bar chart visualizes the top 10 most populous countries using 2018 estimates from the United Nations World Population Prospects 2017, with population values scaled by 1,000. The chart orders countries by population, displaying each bar’s length proportionally to its population via d3.scaleLinear and d3.scaleBand for categorical y-axis positioning. Axes are customized with d3.axisLeft and d3.axisBottom, including a tick formatter that converts G to B for billions, and a title and axis label are added as SVG text elements. The visualization is rendered in SVG using d3.csv for data loading and d3.select to manipulate the DOM.
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.