Making a Bar Chart
✓ Published1🌍 Public
This bar chart displays the populations of the ten most populous countries, based on 2018 United Nations estimates from the World Population Prospects. The data, loaded from a CSV file, is scaled using d3.scaleLinear for the horizontal axis and d3.scaleBand for the categorical vertical axis. The chart renders as SVG rectangles, with population values parsed from strings to numbers and multiplied by 1,000 before being mapped to bar widths. The visualization uses D3 v5, focusing on a clean, margin-less layout within a 960×500 SVG canvas.
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.
MIT Licensed