Skip to main content
100%

D3 Example

✓ Published0🌍 Public
JJan0RodGar
Last edited Jul 27, 2018
Created on Jul 27, 2018

This example visualizes the religious demographics of the top five most populous countries—China, India, the USA, Indonesia, and Brazil—using grouped bar charts. Each country’s population is broken down by religion, with bars colored according to the religious category. The visualization is built with D3.js, specifically using `d3.layout.stack` for the stacked data structure and `d3.legend.color` to generate the color legend. The data originates from the CSV file `religionByCountryTop5.csv`, which is loaded using `d3.csv`. The chart employs SVG rendering with ordinal and linear scales for the axes.

AI-generated description

Grouped bars showing religion by top 5 countries. This is an example from the tutorial Splitting Charts.

<!-- Start of SimpleHitCounter Code --> <div align="center"><a href="http://www.simplehitcounter.com" target="_blank"><img src="http://simplehitcounter.com/hit.php?uid=1967779&f=16777215&b=0" border="0" height="18" width="83" alt="web counter"></a></div> <!-- End of SimpleHitCounter Code -->

forked from <a href='http://bl.ocks.org/curran/'>curran</a>'s block: <a href='http://bl.ocks.org/curran/d4e2b2854f25429a06aa'>Grouped Bars</a>

mit Licensed

Similar vizzes