Skip to main content
100%

Activity 8 Q1.2

✓ Published0🌍 Public
Ssamithareddy9@gmail.com
Last edited Apr 10, 2024
Created on Apr 9, 2024
Forked from Activity 8 Q1.1

This visualization displays population figures for the top countries in 2010 as a horizontal bar chart, with countries listed along the y-axis and population values along the x-axis. The code uses React hooks (useState, useEffect) to load CSV data via d3.csv, then renders SVG rect elements for each bar using React components. Scales are created with d3.scaleBand for the categorical y-axis and d3.scaleLinear for the numeric x-axis, while d3.format with the '.2s' specifier converts population ticks into abbreviated labels (replacing 'G' with 'B' for billions).

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes