You are previewing Visualize This: The FlowingData Guide to Design, Visualization, and Statistics.

Visualize This: The FlowingData Guide to Design, Visualization, and Statistics

O'Reilly logo

Proportions over Time

Often you’ll have a set of proportions over time. Instead of results for a series of questions from a single polling session, you might have results from the same poll run every month for a year. You’re not just interested in individual poll results; you also want to see how views have changed over time. How has opinion changed from one year ago until now?

This doesn’t just apply to polls, of course. There are plenty of distributions that change over time. In the following examples, you take a look at the distribution of age groups in the United States from 1860 to 2005. With improving healthcare and average family size shrinking, the population as a whole is living longer than the generation before.

Stacked Continuous

Imagine you have several time series charts. Now stack each line on top of the other. Fill the empty space. What you have is a stacked area chart, where the horizontal axis is time, and the vertical axis is a range from 0 to 100 percent, as shown in Figure 5-20.

Figure 5-20: Stacked area chart generalized


So if you were to take a vertical slice of the area chart, you would get the distribution of that time slice. Another way to look at it is as a series of stacked bar charts connected by time.

Create a Stacked Area Chart

In this example, look at the aging population. Download the data at ...

The best content for your career. Discover unlimited learning on demand for around $1/day.