🌍 Public
Viewing a saved revision (read-only)
1ccc12d7066a4d659ee28817e8f9b415
Making a Bar Chart
This bar chart displays the population of the top 10 most populous countries, using 2018 estimates from the United Nations World Population Prospects. The code loads data from a CSV file and renders it as an SVG using d3.csv, d3.scaleLinear, d3.scaleBand, d3.axisLeft, and d3.axisBottom. Population values are multiplied by 1000 after parsing, and bars are appended with a steelblue fill. The chart includes left and bottom axes with margins for clear labeling.
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.