Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Splitting Charts

This tutorial deals with the theme of "splitting charts", exploring how simple visualizations can be modified to support an additional dimension of data. Rectangles will be split into stacked bars, circles will be split into pies and donuts, and lines will be split apart.

Topics covered include:

  • stacked bar chart
  • grouped bar chart
  • pie chart
  • donut chart
  • line chart with multiple lines

Additional "goodies" that are covered include:

  • customizing a D3 number format to use "B" for billions
  • rotating tick mark labels to avoid overlap on the X axis
  • using d3.layout.stack

This tutorial assumes you already know the topics covered in Introduction to D3.

Data

The data used in this tutorial begins with a single number, the current population of the World. This single number is conceptually split by country, religion, and time, deriving more complex data tables that require more complex visual presentations.

Population

This is the kind of data you see if you Google population of China.

The following tables are derived from the United Nations Population Division. The data has been preprocessed to extract population of the largest 5 countries for each year from 1950 to 2015, then transformed using this preprocessing script

Religion

This data is shown in this report on The Global Religious Landscape from Pew Research. It is also shown in this interactive visualization.

The following tables are derived from the Pew Research Center Global Religious Landscape data set, using this processing script:

Sketchy preprocessing disclaimer - the original data contained values "< 10000", which were converted to "0" in the preprocessing step so the data can be visualized.

Examples

Check out the Example Viewer. Use left and right arrow keys to navigate.

Feel free to use and modify this presentation framework for your own presentations! MIT License.

By Curran Kelleher October 2015