Skip to main content
100%

Making a Bar Chart

✓ Published2🌍 Public
Mmargaretgoode
Last edited May 7, 2019
Created on May 7, 2019

This bar chart displays the population of the top 10 most populous countries, based on 2018 estimates from the United Nations World Population Prospects. The visualization uses D3.js v5 with SVG rendering, employing `scaleLinear` for the x-axis and `scaleBand` for the y-axis to position bars. The code implements axes with `axisLeft` and `axisBottom`, and loads data from a CSV file via `d3.csv`. Rectangles are appended to an SVG group using a margin convention, with populations converted from thousands to absolute numbers.

AI-generated description

This 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.

MIT Licensed

Similar vizzes