Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

activity 6 question 2

Public visualization

Viewing a saved revision (read-only)

65d9d175ef824f248a729c62805ec1c0

activity 6 question 2

0 stars0🌍 Public
RRakesh Yadav
Last edited Apr 11, 2024
Created on Apr 11, 2024

This visualization shows religious demographics across the top 20 most populous countries using a horizontal stacked bar chart, where each bar represents total population segmented by religion and color-coded via an ordinal scale. A linked color legend allows users to hover over religion categories, which highlights corresponding bar segments while fading others and raising the hovered stack. The chart is built with d3-scale’s scaleLinear, scaleBand, and scaleOrdinal, uses d3-shape’s stack for stacking, and implements responsive resizing via @curran/responsive-axes. Data comes from a static CSV detailing population counts per country and religion.

AI-generated description

Stacked bars showing estimated religion breakdown of the most populous 20 countries in 2010. Based on an example from the tutorial Splitting Charts. Interactions:

  • Hover over the legend to highlight religions.

Data is from The Global Religious Landscape by Pew Research, generated using this processing script.