Skip to main content
100%

D3 Example

✓ Published0🌍 Public
663anp3ca
Last edited Oct 9, 2018
Created on Oct 9, 2018

This small multiples visualization uses donut charts to show the religious breakdown of the five most populous countries. Each donut represents a country, with slices sized by the proportion of followers of each religion within that country, though the donuts themselves are equal-sized regardless of population. The code uses D3.js (v3) with `d3.layout.pie`, `d3.svg.arc`, and `d3.nest` for data grouping, plus the d3-legend library for the color legend. Data comes from the Pew Research Center’s Global Religious Landscape dataset, rendered as SVG.

AI-generated description

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

Note that area is not proportional to population, because the donuts are all the same size, regardless of population. This visualization shows the proportions of different religions within each country only. This property makes this visualization misleading in a way. For example, Brazil gets just as many pixels as China while being only a fraction of the population. To remedy this, it would be better to size each donut chart based on the population of each country.

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>

<!-- Start of SimpleHitCounter Code --> <div align="center"><a href="http://www.simplehitcounter.com" target="_blank"><img src="http://simplehitcounter.com/hit.php?uid=1980290&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/11b02f8917fac66d6fe5'>Donut Chart Small Multiples</a>

mit Licensed

Similar vizzes