Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activty_6_Question_1_2

Public visualization

Viewing a saved revision (read-only)

531dc8c9e6024c3fbc380828b6dde018

Activty_6_Question_1_2

0 stars2🌍 Public
Ssriharshithaanugu5@gmail.com
Last edited Mar 30, 2025
Created on Mar 30, 2025

This interactive bar chart visualizes the population of the top 20 countries for the year 2010. Built with React and D3 v5, the visualization maps country names to a categorical y-axis and population values to a linear x-axis, using SVG rectangles to represent each data point. The code utilizes `d3.scaleBand`, `d3.scaleLinear`, and `d3.format` to construct the axes and format tick labels, with hover tooltips displaying the population. Data is loaded asynchronously from a CSV file via `d3.csv`, and the chart is rendered using the React DOM, with axes and marks encapsulated as separate components.

AI-generated description