Skip to main content
100%

Making a Bar Chart

✓ Published1🌍 Public
CClara Hu
Last edited Mar 22, 2021
Created on Mar 22, 2021

This bar chart displays the population of the top 10 most populous countries, based on 2018 estimates from the UN World Population Prospects. The visualization uses D3 v5 with SVG rendering, employing `d3.scaleLinear` for the x-axis and `d3.scaleBand` for categorical y-axis placement. After loading the data with `d3.csv`, population values are parsed from strings to numbers. The code appends rectangles to represent each bar, and adds axes using `d3.axisLeft` and `d3.axisBottom`, with styling applied via CSS.

AI-generated description

This bar chart shows population of the top 10 most popular countries. The data comes from the year 2018 estimates in Word Population Prospects 2017.

MIT Licensed

Similar vizzes