Playing with a bar chart
This bar chart displays the populations of the top 10 most populous countries, based on 2018 estimates from the United Nations World Population Prospects. The chart uses horizontal bars, with countries labeled on the x-axis and population values on the y-axis. Built with D3 v5, it demonstrates customizing axes via `scaleBand`, `scaleLinear`, `axisLeft`, and `axisBottom`, and renders as SVG. The population data is loaded from a CSV file and converted from strings to numbers using `csv` and a `forEach` loop. The chart includes a title and axis labels.
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.