Skip to main content
100%

activity 6_Task 1-2

✓ Published1🌍 Public
Nnissisharon61@gmail.com
Last edited Mar 31, 2025
Created on Mar 31, 2025
Forked from HTML Starter

This example shows a horizontal bar chart comparing the populations of 20 countries in 2010, sorted in descending order. The chart uses D3 v5 to create an SVG visualization, with `d3.scaleLinear` mapping population values to the x-axis and `d3.scaleBand` positioning countries along the y-axis. The data is loaded from a CSV file via `d3.csv`, with the population column parsed and filtered to the top 20 entries. Rice-shaped bars are rendered using SVG rectangles, with axis labels and styling applied through CSS classes.

AI-generated description
MIT Licensed

Similar vizzes