Skip to main content
100%

D3 Example

✓ Published0🌍 Public
CCurran Kelleher
Last edited Nov 24, 2015
Created on Nov 24, 2015

This example shows small multiples pie charts comparing the religious breakdown of the world’s five most populous countries, with each pie’s area scaled proportionally to that country’s total population. The visualization uses D3’s nested selections and d3.layout.pie with d3.svg.arc to draw the charts, d3.scale.sqrt for the population-based radius, and d3.legend.color for the categorical color key. Data comes from the Pew Research Center’s Global Religious Landscape dataset, loaded from a CSV file.

AI-generated description

A small multiples visualization of pie charts showing the breakdown of religions for the largest 5 countries. This is example 33 from the screencast Splitting Charts.

Note that area is proportional to population, because the area of each pie corresponds to the population of each country (the sum of all religions).

forked from <a href='http://bl.ocks.org/curran/'>curran</a>'s block: <a href='http://bl.ocks.org/curran/40d5e61963abf20da067'>Polar Area Small Multiples</a>

forked from <a href='http://bl.ocks.org/curran/'>curran</a>'s block: <a href='http://bl.ocks.org/curran/11b02f8917fac66d6fe5'>Donut Chart Small Multiples</a>

forked from <a href='http://bl.ocks.org/curran/'>curran</a>'s block: <a href='http://bl.ocks.org/curran/be3744cfe1b318bf4035'>Pie Chart Small Multiples</a>

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

Similar vizzes