SankeyMATIC Gallery: U.S. Federal Budget

Comparing values across Sankey diagrams

Back to Gallery Home

Let’s begin with some tilted 3D pie charts and work our way toward a more revealing visualization.

This example was spurred by an observation from David Yanofsky (at right) about the Federal Budget as shown on yearly tax forms.

Taking a closer look at the first and last examples, here are the pie charts from the original IRS 1040 forms (for budget years 1993 & 2012):

2012:

(View larger)
2012 pie charts from IRS 1040 form

Here are the above 1993 and 2012 pie chart pairs, with Receipts and Outlays converted to flows in two separate Sankey diagrams:

Federal Receipts and Outlays as Percent of Budget

1993

(View larger)
1993 pie charts as a Sankey diagram

SankeyMATIC Source Data:

2012

(View larger)
2012 pie charts as a Sankey diagram

SankeyMATIC Source Data:

Diagram Notes:

  • Receipts are shades of green, Outlays are shades of blue.
  • Two flows have other colors, since they are qualitatively different from the other Receipts & Outlays:
    • “Borrowing to cover deficit” is red.
    • “Net interest on debt” is brown.
  • Between 1993 and 2012, you can easily spot the growth in deficit borrowing (as a percentage of the whole) and a reduction in the proportion of payments of debt interest.
  • The list of nodes and their colors will remain exactly the same for most of the upcoming diagrams, so I will omit them from the “SankeyMATIC Source Data” in the interest of space.

The above diagrams lay out the relative proportions without any distortion from 3D tilting. Comparisons between the pie ‘slices’ are therefore easier.

Now that we have the two diagrams, though, what if we want to compare the two years to each other?

Then the above diagrams are not that useful—the 2012 budget could be ten times the size of 1993’s (or vice versa) and these diagrams would still quietly imply that the budgets’ sizes are similar.

We need some actual amounts to compare, not just percentages.


Searching for actual federal budget numbers leads to the U.S. Government Printing Office (GPO), which has a page with a wealth of historical data available for download.

I found the numbers underlying the pie charts’ percentages in the following GPO documents:

When you dig into the real dollar amounts, you discover there is actually another flow to account for—“Undistributed Offsetting Receipts”, which is treated as a negative outlay. (The original IRS documents do mention this amount in a footnote but leave it out of the pie charts, presumably since a negative amount is...difficult to display in a pie chart.)

I rendered the negative outlay (and kept the diagram balanced) by:

So, plugging in the dollar amounts for the two years (unadjusted for inflation) produces:

Federal Receipts and Outlays in “Current” Dollars

Dollar amounts not adjusted for inflation

1993

(View larger)
1993 receipts and outlays in current dollars

SankeyMATIC Source Data:

2012

(View larger)
2012 receipts and outlays in current dollars

SankeyMATIC Source Data:

Diagram Notes:

This still isn’t good enough for a useful comparison, since between these two years the value of a dollar changed a great deal.

We don’t have to rely on guessing what the inflation factor is between the two years; the GPO provides a “Composite Deflator” figure for each year in its “Table 1.3” document which can be used to convert both sets of numbers into 2009-equivalent dollars.

By dividing each year’s figures by the Composite Deflator for that year, we normalize the amounts to be on the same scale.

Having done this for all of the above amounts, the diagrams now look like this:

Federal Receipts and Outlays in 2009 Dollars

1993

(View larger)
1993 receipts and outlays in 2009 dollars

SankeyMATIC Source Data:

2012

(View larger)
2012 receipts and outlays in 2009 dollars

SankeyMATIC Source Data:

Now—finally—we are comparing equivalent units across the years: 2009 dollars. But we still have to glance back and forth and read every number to understand the differences.

So: let’s make a billion dollars on the left the same size as a billion dollars on the right, shall we?


SankeyMATIC makes this possible by telling you what the scale of your diagram is, quantified in the units you are using. Look under the “Advanced” section in the controls to find it.

The scales for the above diagrams are:

1993

Diagram Scale = $2,079.3B / 402.00px = $5.172388B/px
  

2012

Diagram Scale = $3,640.6B / 402.00px = $9.056219B/px

We have two choices to get these scale numbers to match up more closely: we can:

  1. make the 1993 diagram shorter, or
  2. make the 2012 diagram taller

Since differences between flows are harder to discern the smaller you make them, I chose to expand the 2012 diagram instead of shrinking 1993.

This involved trial and error, increasing the 2012 diagram’s Height and checking its scale until it was as close to 1993’s as possible.

The final 2012 diagram Height I arrived at was 802 pixels (801 pixels and 803 pixels both produced a scale further away from 1993’s.)

Now one pixel of height is $5.17B in both diagrams:

1993

Diagram Scale = $2,079.3B / 402.00px = $5.172388B/px
  

2012 (new scale)

Diagram Scale = $3,640.6B / 704.00px = $5.171307B/px

Here are the resulting diagrams, finally visually comparing dollars-to-dollars across years. (We can now provide an accurate scale example as well.):

Federal Receipts and Outlays in 2009 Dollars

scale example, 20px high = 20 pixels = $103 Billion.

1993

(View larger)
1993 receipts and outlays in 2009 dollars

SankeyMATIC Source Data: Same as above

2012

(View larger)
2012 receipts and outlays in 2009 dollars

SankeyMATIC Source Data: Same as above

Now it is a much faster process to observe (for instance) that every category of funds expanded, except for “Net Interest on Debt”.

You can imagine extrapolating this to display Sankey diagrams from several years together, all sharing a common scale.

Or you could show different slices of a large data set next to each other, scaled for accurate comparison.


One additional option exists to make comparisons between the two even more direct:

SankeyMATIC can reverse a diagram to flow right-to-left, so that the Outlays in the 2012 diagram are bumping up against the Outlays from 1993.

This option is also under the “Advanced” section in the controls; it is simply a checkbox:

Reverse the graph (flow right-to-left)

Checking that option and re-producing the scaled-up 2012 diagram gives this result:

Federal Receipts and Outlays in 2009 Dollars

scale example, 20px high = 20 pixels = $103 Billion.

1993

(View larger)
1993 receipts and outlays in 2009 dollars

SankeyMATIC Source Data: Same as above

2012

(View larger)
2012 receipts and outlays in 2009 dollars

SankeyMATIC Source Data: Same as above

The Outlays are now easier to compare directly. (Comparing the Receipts in a similar way would just be a matter of swapping the two diagrams’ positions.)

Summary:


See the Manual for more specific examples, or
return to the Gallery home page, or
go forth and try out a diagram of your own.