Skip to main content
100%

Making a Bar Chart

✓ Published1🌍 Public
Vvlad
Last edited Dec 18, 2020
Created on Dec 18, 2020
Forked from 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 2017. It shows the data with horizontal bars arranged by country, with a formatted x-axis using a custom `replace('G', 'B')` on `d3.format`, and a removed y-axis domain and ticks for a cleaner look. Built with D3 v5, the chart uses `select`, `csv`, `scaleLinear`, `scaleBand`, `axisLeft`, `axisBottom`, and `max` from the D3 API, and renders as an SVG. The data is loaded from a local `data.csv` file, with population values multiplied by 1000 during preprocessing.

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. It also demonstrates customization of D3 axes.

MIT Licensed

Similar vizzes