Skip to main content
100%

Activity-6_Task 1

✓ Published0🌍 Public
Ssriyaalugupalli@my.unt.edu
Last edited Oct 20, 2024
Created on Oct 20, 2024
Forked from Activity-6_Task 1

This visualization is a horizontal bar chart displaying the 2020 population estimates for 30 countries, sourced from a CSV file hosted on GitHub. The chart uses green bars, with the length of each bar proportional to the population value, and includes a formatted x-axis that abbreviates large numbers (e.g., converting billions to "B"). The code leverages D3's `scaleBand` for the categorical country axis, `scaleLinear` for the population axis, and React's `useEffect` hook to asynchronously load and parse the data with `csv`. The rendering is done entirely through SVG elements, with the data plotted using `rect` marks and tooltips provided via `<title>` elements.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes