Skip to main content
100%

Top 3 Largest Cities

✓ Published0🌍 Public
Mmargaretgoode
Last edited May 13, 2019
Created on May 7, 2019
Forked from Making a Bar Chart

A horizontal bar chart displays the population of the top three largest cities—Shanghai, Mumbai, and Sao Paulo—based on 2018 data from the United Nations World Population Prospects. The visualization renders as SVG, using D3 v5’s `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to map population counts to bar widths and country names to vertical bands. Data is loaded from a CSV file via `d3.csv`, with values parsed as numbers. Green rectangles encode each city’s population, and axes are labeled with default text formatting.

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