making a bar chart
✓ Published0🌍 Public
This example shows a bar chart of the top 10 most populous countries, using data from a local CSV file. The visualization renders horizontal bars sorted by population, with each bar labeled by country name and population value. The code loads the data with `d3.csv`, imports D3’s `select` and `arc` modules, and sets up an SVG container defined in the HTML. While the chart is intended to display the population ranks, the current implementation only logs the parsed data to the console, leaving the visual bars to be constructed. The example is designed for easy forking and modification with new datasets.
AI-generated descriptionA bar chart showing the top 10 most populous countries on Earth as of January 1st 2024.
Challenge
- Fork this viz and modify it to show your own data
MIT Licensed