🌍 Public
Viewing a saved revision (read-only)
8d1eaca0b7514f768dbc9558d27277a1
Making a Bar Chart
This bar chart displays the populations of the ten most populous countries, using 2018 estimates from the United Nations’ World Population Prospects. The visualization loads data from a CSV file with `d3.csv`, then renders horizontal bars using `d3.scaleLinear` for the x-axis and `d3.scaleBand` for the y-axis categories. Axes are drawn with `d3.axisLeft` and `d3.axisBottom`, while each rectangle’s width and height are set by the scales. The chart is rendered as SVG, with bars styled through a CSS `fill` rule.
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.