D3 Example
A horizontal bar chart displays the 2010 populations of major world religions, from Christians at over two billion to Jews at under fourteen million. The visualization encodes data from the Pew-Templeton Global Religious Futures Project using an SVG rendered with D3.js, where bar lengths reflect population and a tooltip reveals exact figures. The code employs d3.scale.linear, d3.scale.ordinal, and d3.svg.axis, with a custom SI format replacing "G" with "B" for billion. The Playfair Display font and d3-tip library support styling and interactive hover effects, while the data is loaded from a local CSV file.
AI-generated descriptionA bar chart showing population of World religions in 2010. Data shown is from the Pew-Templeton Global Religious Futures Project.
This data is taken exactly as-is from the Pew-Templeton Web site, including labels for religions, and does not represent my opinions. This data may not be 100% accurate, I'm not sure. I'd be curious to see results from others sources that show a similar comparison of World religions.
The code for this chart is derived from example 105 of the screencast Introduction to D3.js. Also, the tool tip approach draws from d3noob’s Simple d3.js tooltips block