Making a Bar Chart
✓ Published0🌍 Public
This bar chart displays the populations of the world’s most populous cities, based on 2018 United Nations World Population Prospects estimates. The visualization uses D3 v5 with SVG rendering, employing `scaleLinear` and `scaleBand` to map population values to bar widths and city names to vertical positions. Axes are generated with `axisLeft` and `axisBottom`, while data is loaded asynchronously from a CSV file using `d3.csv`. Each bar’s width is proportional to its population value, with the chart ordered alphabetically by city name.
AI-generated descriptionThis 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