This post uses population data for Washington State population provided by the Washington State Office of Financial Management (OFM). The takeaway hack from this post is how to get two measures of data into one Tableau worksheet while making it look like just one measure. The first measure is historical population, the second is projected population.
It wasn’t easy and took some work to figure out. First, the source Excel worksheet isn’t something that makes sense ingesting into Tableau. The population data is in columns in the source data but for Tableau to ingest in a way that makes the data usable for human analyst, I transposed the matrix; each column of year data was turned into a row of year data. I used R for this data munge.
The key to get the two measures to look as one is to create a second measure, projected population. It’s a copy of the total population for all of the years. I copied the total and called it projected population. In this data, historical data is through 2010. I renamed the original total to historical population and recoded the data for each year after the end of the historical population, 2010, with
The dark vs. light blue differentiates the projected population from historical totals:
Dashes are used to show projections because the visual cue of a dash tells us there is less certainty in the figure. Solid lines are a visual cue for more certainty. When dashes for projections are used, it’s common to see both the solid and dashed lines using the same color. Another way to differentiate historical from a projection is to use color. For a line of the same width, i.e., size, or thickness, a lighter, more transparent shade of the same color is a cue for uncertainty. Color is instead of a dashed line works. In Tableau, a line mark can only be a solid line, not both solid and dashed. So, we use color.
You might notice that there is a gap between the end of the historical population line and the start of the projected population line. Before I added my custom tooltip labels, the transition was a blend. I think the gap is better than the blend and was happy with what Tableau did once I added my custom tooltip labels to my Marks card.
The dashboard is a usual size for something of its kind displayed on the web or as a component on another dashboard. What you can’t see unless I point it out is that the blue color graduates from dark to lighter blue as the population figures decrease in 2010 to 1970. It’s not noticeable when published.
I think the approach and published solution work well. One way I’d like to expand this solution is to use data that has a band or confidence interval for the projection.