Making a Bar Chart
✓ Published0🌍 Public
This example visualizes the population of the top 10 most populous countries, using 2018 estimates from the United Nations World Population Prospects 2017. A static SVG bar chart displays countries along the vertical axis and population values along the horizontal axis, with steelblue bars sized by `d3.scaleLinear` and `d3.scaleBand`. The code loads data from a CSV file via `d3.csv`, converts population figures, and renders axes with `d3.axisLeft` and `d3.axisBottom`.
AI-generated descriptionThis bar chart shows the population of the top 10 most populous countries. The data come form the year 2018 estimate in United Nations: World Population Prospects 2017.
MIT Licensed