🌍 Public
Bar chart
This bar chart displays the populations of the top 10 most populous countries in 2021, ranked from China to Mexico. The visualization uses a horizontal bar layout, with population values plotted on a linear x-axis and country names on a banded y-axis. The data is loaded from a CSV file using D3’s `csv` function and rendered as SVG rectangles. The code applies `scaleLinear` and `scaleBand` for scaling, and customizes axes with `axisBottom`, `axisLeft`, and tick formatting that converts values to billions.
AI-generated descriptionThis bar chart shows population of Top 10 countries in 2021. The data comes from Countries in the world by population (2021)
MIT Licensed








Comments
Sign in to join the discussion.