A visual exploration of over a century of monthly precipitation totals data in Sacramento:

With the ongoing California drought, an impending strong El Nino, and high hopes of a consequently wetter than average winter, I wanted to explore some alternatives to visually representing monthly rainfall totals in Sacramento since 1893. I built each of the alternative visual representations below in D3.js to explore the data and see how effective each might be at visually showing monthly rainfall totals over time.

The Data

Over 123 years of monthly rainfall totals as measured in downtown Sacramento. Data source: National Climatic Data Center.


Although the stacked bar chart was my first thought for representing the data, I wanted to try something a bit more “interesting” so I opted for a streamgraph which stacks each month’s rainfall totals vertically for all years which are along the x axis. I don’t think this is particularly effective or insightful for analyzing details of a specific year, but I do like how it shows the “flow” of rain for a given month over the years. For example, if you hove your mouse over any of the orange portion of the graph that represents February rainfall, you can see how rainfall in the month of February has varied over 100+ years when that portion of the graph is highlighted. It’s not great for detailed analysis or comparisons but I think it works for high level overview.

Dot Plot

Circles, or areas in general, aren’t the best way to represent amounts for comparison, so this isn’t the best way to give people an idea of precise rainfall amounts. It also fails miserably at letting people see rainfall totals for a given year. But, I think the dot plot representation does a good job of highlighting just how dry the summer months in Sacramento are compared to the winter months.

Stacked Bar Chart

The stacked bar chart probably does the best job at allowing comparisons of rainfall amounts by month and yearly totals. The visual encoding of the data in the stacked bars best takes advantage of what the human brain is good at, comparing lengths across a common axis.

So, which representation is best? I think the answer to that depends on what exactly is trying to be explained. Overall, the stacked bar chart probably does the best job if the role of the visualization is to show rainfall amounts by month and yearly totals to compare yearly totals as well as monthly totals across years. But if the main intent were instead to show just how dry the months of May – September are compared to the Winter months, then the dot plot might actually be a better representation. The best visual representation ultimately comes down to what we want to communicate to the reader and knowing what insights we expect the reader to gain from the data visualization.