Top Megacities Population
This bar chart displays the populations of the world’s top 20 megacities, with each bar colored by continent—red for Asia, blue for North America, green for South America, and yellow for Africa—revealing that most megacities are in Asia. Using D3 v4 with SVG, the code applies `d3.scaleLinear` for the value axis, `d3.scaleBand` for the categorical city labels, and binds data to grouped `<g>` elements with rectangles and text labels. The dataset originates from Wikipedia’s Megacity page, and hover effects darken bars via CSS.
AI-generated descriptionThis bar chart was inspired by my humanity seminar- Urban Studies. Data from Wikipedia: Megacity.
Built with blockbuilder.org
forked from <a href='http://bl.ocks.org/curran/'>curran</a>'s block: <a href='http://bl.ocks.org/curran/5cb71249dcbfd635c794520aff45b89d'>Extremist Murders in the US</a>
This simple block shows the population of top 20 megacities in the world (in millions) - data from Wikipedia. Megacity is generally defined as a metropolitan area with a total population in excess of ten million people.
I color coded the continent: Red for Asia, Blue for North America, Green for South America, and Yellow for Africa.
From this color code, we can see a majority of the megacities are in Asia.