Skip to main content
100%

Marcus' bar chart exercise

✓ Published1🌍 Public
Mms-aus
Last edited Aug 19, 2019
Created on Aug 19, 2019

This example shows the population of the 10 most populous cities as a horizontal bar chart, with city names on the y-axis and population counts on the x-axis. The visualization is rendered as an SVG using D3 v5, and the code imports specific modules (`select`, `csv`, `scaleLinear`, `scaleBand`, `axisLeft`, `axisBottom`) from the D3 library. Population data is loaded from a local CSV file and converted from strings to numbers. The chart uses a band scale for the categorical axis and a linear scale for the quantitative axis, with axes generated via `axisLeft` and `axisBottom`. A pink background and steelblue bars style the output.

AI-generated description

Population of 10 most populous cities

MIT Licensed

Similar vizzes