US Federal Budget Balance, 1968-2017
This interactive dashboard visualizes the US federal budget balance from 1968 to 2017, combining a multi-series bar chart, an animated Sankey diagram, and line charts to show revenue sources, spending categories, and yearly deficits. A slider scrubs through time, updating a diverging stacked bar chart for balance, while the Sankey diagram uses D3.js (version 4.11) with custom `d3.sankey` layout functions to link tax sources to spending categories. The code also uses `d3.scaleBand`, `d3.stackOffsetDiverging`, and `d3.sliderHorizontal` from the d3-simple-slider library, with data loaded from CSV files.
AI-generated descriptionUS Federal Budget Balance, 1968-2017
Hover over the categories!
Rough draft of a federal budget dashboard. Could use a lot of UX improvement, but I like that it fits high and low level detail into a small space.
See this in webpage form on my website at
https://masonchinkin.github.io/us-budget-sankey.html#portfolio
Notes:
- I want to animate the updated Sankey, but as you can see HERE the nodes do not relocate properly.
- THANK YOU to Micah Stubbs for helping me use bl.ocks and being so generous with his time.