Making a bar chart
This example visualizes the population of the top ten most populous countries in 2017 using a horizontal bar chart. The chart maps country names to the y-axis with a band scale and population values to the x-axis via a linear scale, with bars rendered as SVG rectangles. It uses D3 v7 modules including `csv`, `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom`, and formats axis tick labels with `format('.3s')` to display values in billions. The data, from World Population Prospects 2017, is loaded from a local CSV file where population figures are multiplied by 1000.