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 chart renders with SVG, using D3 v5’s `scaleLinear` for the population axis and `scaleBand` for country categories, with `axisLeft` and `axisBottom` for labels. Data is loaded from a CSV file via `d3.csv`, and each country’s population is multiplied by 1,000 before being drawn as steel-blue rectangles.