Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 6 task 1

Public visualization

Viewing a saved revision (read-only)

75242f9dab094b26bcd0bff0704cba0b

Activity 6 task 1

0 stars0🌍 Public
NNithish Karanam
Last edited Apr 5, 2025
Created on Apr 5, 2025
Forked from Hello VizHub

This horizontal bar chart ranks the 30 most populous countries in 2020, using population size along the x-axis and country names along the y-axis. The visualization loads CSV data from a GitHub repository via `d3.csv`, processes it with a custom row function, and sorts the entries in descending order. The chart is rendered as an SVG using `d3.select`, `scaleLinear`, and `scaleBand`, with axes generated through `axisBottom` and `axisLeft`. Bars are drawn with `selection.join('rect')` and are styled with a light green fill, while tick labels use a custom si-format prefix converter that replaces 'G' with 'B' for billions.

AI-generated description