Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Refactored Bar Chart

Public visualization

Refactored Bar Chart

0 stars1๐ŸŒ Public
RRedSorrel
Last edited Sep 20, 2021
Created on Sep 20, 2021

This visualization presents a horizontal bar chart comparing the 2020 populations of ten countries, sourced from UN World Population Prospects data on GitHub. Built with React and D3 v7, it renders SVG marks using scales: `scaleBand` positions countries along the y-axis, while `scaleLinear` maps population values to bar widths. The chart explicitly defines reusable components for axes and marks, with `AxisBottom` generating ticks and `AxisLeft` labeling country names, all within a fixed viewport. The data loads asynchronously via `csv`, showcasing a clean, modular refactoring approach.

AI-generated description

A program that loads in some data about World Population Prospects from the UN.

Comments

Sign in to join the discussion.

MIT Licensed