
US Budget Visualization Using d3 - sethbannon
http://solomonkahn.com/us_budget/#
======
skore
Why does it resort and regrow all the blocks when you switch between years or
other settings? If the same blocks simply grew or shrunk, it would be a lot
easier to follow the difference.

Actually, it sometimes simply converts blocks into others - switching between
2012 and 2013, the "Justice" block morphs into the "National Infrastructure
Bank" block. Very confusing.

~~~
SIK
this is because some blocks are added and removed from year to year. In this
type of visualization, it's impossible to keep things the same size and
position while also changing the amounts.

The best way to use this isn't to switch between years. If you click on any
cell, you can see a graph of how that changes over time. If you double click
on any of the cells, you can see a new visualization of everything that makes
up that cell. For example, double clicking on the department of justice will
show you it is made up of X billion from the department of prisons and X
billion from the FBI.

~~~
hamburglar
It's definitely not because some blocks are added and removed. Click on the
same year twice and the blocks animate all over the place. The animations are
worse than useless -- they actually hinder the ability to compare two years.

------
mdkess
This is not a very good visualization.

It makes it impossible to compare values in any meaningful sense - either in a
relative growth, or the size of the budget as a whole. The animation serves no
purpose, other than to make the user wait a few seconds between switching
years.

~~~
bargl
I took a stab at rewriting your comment so that it still got the point across
but lost some of the tone that I felt was overly rude.

\---------

This visualization, while technically impressive, could use a little work.

Comparing values is difficult because I can't see the relative growth between
the boxes from year to year, or size of the budget as a whole. I don't quite
see how the animation benefits the user, so you may want to scrap it for some
sort of differential comparison. I also don't like the delay when I change
from year to year. That could be optimized or reduced through the reduction of
the animation time.

\---------

Yeah, I know it's kind of snarky of me to correct your entire comment here,
but I think our community (yeah I know I haven't had my account here long) is
overly focused on criticizing. While all the content of your comment was
awesome, it could have been stated in a more polite manner.

I'm not sure how to fix the attitude that crops up in developer communities,
all I can think to do is point it out when people may be coming off in way
they don't mean to. Which is probably the root cause for this
[https://news.ycombinator.com/item?id=6353957](https://news.ycombinator.com/item?id=6353957)

~~~
mdkess
My intent was to be terse, not rude, and to give actionable feedback - not
hidden in language and subtext. And anyway, language is supposed to have edge!
I didn't want to say "this is sort of kind of less than optimal." I wanted to
say "This is not good! You can do better! Here is how it can be improved!". If
everyone just thought "meh" and said "well, that's pretty good. A+ for effort"
\- or worse, said nothing - people wouldn't improve. Non-actionable positive
feedback is as harmful as non-actionable negative feedback.

Your correction (which I don't mind in and of itself) adds complexity and
obscures the meaning of my statements. It says in 85 words what I said more
clearly (and sharply) in 51. You add a white lie - "technically impressive" \-
to mask the true meaning of the point that is being made. And the tone is
changed to reads as though you're talking to a child.

And - would a person whose second or third language was English more clearly
understand your version or mine?

I agree that the community can be overly critical, but I don't think that this
sort of criticism is the problem. The kind of criticism that is a problem is
non-actionable criticism - insults to the person, or just "X already did this"
or "nobody wants this".

I want terse, actionable feedback.

Also - "yeah I know I haven't had my account here long" are defense
mechanisms, don't use them. You're a member of the community now, you get a
voice like everyone else.

~~~
bargl
I agree that not everyone deserves a gold star but I tend to try the carrot
over the stick in most instances. I do beat around the bush more than I
should, and that's something I personally need to work on.

I realize that a lot of times terse can be better, and you modified your own
comment better than I ever could. >"You can do better! Here is how it can be
improved!"

That little bit of encouragement could be the support that changes the
recipients reaction from "F-U man you don't know me" to "Wow, thanks for that
criticism, I'll get on that." And you've only added 11 words.

High ranking HN comments tend to be negative, which leads me to feel like HN
is not very supportive. This isn't the only metric, but having a good ratio of
positive to negative feedback (assuming everything is equally actionable) is
important. [http://blogs.hbr.org/cs/2013/03/the_ideal_praise-to-
criticis...](http://blogs.hbr.org/cs/2013/03/the_ideal_praise-to-
criticism.html)

>Also - "yeah I know I haven't had my account here long" are defense
mechanisms, don't use them. You're a member of the community now, you get a
voice like everyone else. Thank you,
[https://news.ycombinator.com/item?id=5636314](https://news.ycombinator.com/item?id=5636314)
this kind of thing has made me hesitant to use terms like "our community".

------
SIK
Author here! There seems to be some confusion about this visualization, but we
can solve it with just two words: Start Clicking!

The thing that makes this visualization different than other visualizations is
that you can see the individual components of what makes up the large
departments. Just double click on any of the boxes. If you single click on any
box, you can see how that box changed over time.

So, for example, you can see that in 2012 that 2.89% of the budget went to
education, but if you double click, you can see that only 13.73% of that went
to elementary and secondary education.

You can also single click anywhere and see a graph of how things have changed
over time. So you can see that in 2009 there was a huge spike in elementary
and secondary education, and you can go to 2009 to further investigate, and
find there was a "State Fiscal Stabilization Fund" in 2009 that sent $14
billion to education, and then went away.

As many have noted, this doesn't do a good job at comparing different
departments to each other over time. This isn't a surprise, since a treemap is
the completely wrong format to be able to do that. However, it is a very good
format for exploring what agencies, bureaus and line items make up the large
departments, which is data I've never seen anywhere else before, and why I
built this visualization.

------
Zikes
NYT has a 2013 budget proposal visualization in d3, made I believe by Mike
Bostock himself:
[http://www.nytimes.com/interactive/2012/02/13/us/politics/20...](http://www.nytimes.com/interactive/2012/02/13/us/politics/2013-budget-
proposal-graphic.html)

~~~
denzil_correa
It says "By Shan Carter" on the webpage.

~~~
Zikes
Ah, missed that.

------
hnriot
Failed to load resource
[http://solomonkahn.com/us_budget/public/facebox.js](http://solomonkahn.com/us_budget/public/facebox.js)

Uncaught TypeError: Cannot read property 'settings' of undefined

Chrome/Linux

~~~
SIK
are you on the latest version of chrome?

------
wovenpixel
Does this include discretionary spending? I feel like that's pretty essential
to understanding exactly what's going on... Mil-spending would look a lot more
massive, I believe.

~~~
fuqua
Basically everything beyond Social Security and Medicare/Medicaid is
discretionary spending. If you get rid of those, then yes, military spending
looks huge as a share of discretionary spending.

There are dozens of sites breaking down the spending (this is just another
attempt at visualizing the data). A quick search led me to
[http://nationalpriorities.org/budget-basics/federal-
budget-1...](http://nationalpriorities.org/budget-basics/federal-
budget-101/spending/) where you can find discretionary spending separated out
on its own.

~~~
wovenpixel
Well, if you mean [some people] get together and figure out what to do spend
money on and call it "the budget." Yes, I guess so.

But I mean, my understanding is that there is un-allotted money the government
is willing to spend, beyond whatever budget they approve. My understanding was
that, in particular, the military budget increases dramatically under these
mechanisms.

Also - Social Security should also be separate, really, it's a trust fund with
a very specific money - if we turned Social Security off tomorrow, it isn't
like the money collected could go elsewhere. Money collected into that fund &
being spent into that fund should not be able to be reallocated elsewhere.

------
twoodfin
It's pretty shocking how much more expensive Federal unemployment benefits
have been for this most recent recession, assuming that's what's responsible
for the massive spike in the Department of Labor's budget.

Compare with the 2001-2002 tech bust, for example.

~~~
pessimizer
The bubble destroyed US employment, and there has been very little improvement
from the lowest percentage reached of prime aged workers that are employed:

[http://stateofworkingamerica.org/charts/drop-in-
employment-d...](http://stateofworkingamerica.org/charts/drop-in-employment-
during-2007-recession-truly-stunning/)

I assume that as unemployment benefits drop, these people will begin to move
into homelessness.

------
wahsd
Please correct me, but there seems to be something wrong. Look at the 2013
budget, "Per Capita", and "Inflation Adjusted". Those numbers should
essentially be the same as "Plain Dollars", which is multiples larger.

~~~
SIK
The base year for inflation is 1976, so the multiple is because a dollar in
1976 is worth multiples of a dollar in 2013.

~~~
wahsd
OK, that explains things now. But I don't think that's the best default
display, especially since it is not explained anywhere. I don't recall any
examples where the base inflation year is the past by default.

It's great to allow users to adjust the base year in case they want to, e.g.,
for purposes of inform how past past dollars relate to today's circumstances
(e.g. Neil Cavuto expressing how he worked for $2 an hour when he was younger
and loved it and so can we), but 1976 being the base year is not very
productive, it's a floating reference that loses relevance as a default.

------
borgchick
So basically since 1976, the US is only on the positive side of the budget for
4 years (1998-2001). For all other (34) years, there has been a deficit.
Yicks. If the US was a person, that person would be considered a financial
disaster.

~~~
mpyne
Lucky for us then, that the US is not a person.

Unlucky for us, it's even harder to determine a healthy budget than looking at
income vs. outlays. E.g. if the money supply grows faster than the national
debt then even a small but constant deficit may still be an entirely healthy
thing.

------
duiker101
This visualized well enough the difference in sectors for the same year but
not the difference between years. Might be nice that selecting one section
will show a line graph indicating the change over the years for that sector.

~~~
SIK
this is exactly how the visualization works! If you click on any cell, it
shows you how that has changed over time. If you double click, you can see
more details about whatever you clicked on.

For example, if you double click on the department of Justice, you can see it
is made up of X billion of the FBI, X billion of the department of prisons,
etc...

~~~
duiker101
I totally missed that I am truly sorry! well done!

------
pagekicker
Actually, the US budget is not at all inaccessible ... this is one in among
thousands of budget visualizations that are done every year for all sorts of
publications. It is nice, doesn't need the hype.

~~~
wahsd
"hype"? Your bar for exaggeration is quite a bit lower than mine, which is
impressive in and of itself. I thought we are just looking at it,
constructively critiquing it, and supporting the effort, discovering any
possible innovative or unique aspects, and informing people. But I guess some
might see hype there instead.

------
stephenitis
The color profile on this chart makes it really hard to process...
[http://grab.by/q7ja](http://grab.by/q7ja) It may be the text also and the
choice of shapes.

~~~
stephenitis
that being said. I still enjoyed the insight.

------
rayiner
You can almost see Gingrich's "Contract with America" happening in 1994-1996
as debt payments ballooned to almost a quarter of the budget.

------
rthomas6
This is nice, but it would be useful to have a display mode that graphs
categories' change in their fraction of overall expenditure over time.

------
kakali
Why is there a Railroad Retirement Board in the US budget? Shouldn't that
somehow be combined with Social Security?

~~~
wahsd
Read up on the history of the railroad sector. It's corrupt, it's nasty, it's
disgusting, and it's depressing.

------
cocoflunchy
Nice! I think the inflation adjusted graphs should be the default though.

------
denzil_correa
Health and Human Services - 921.61B USD, important and interesting.

~~~
benmccann
HHS spending is almost entirely spending for Medicare and Medicaid Services
(see
[http://en.wikipedia.org/wiki/United_States_Department_of_Hea...](http://en.wikipedia.org/wiki/United_States_Department_of_Health_and_Human_Services#Budget))

~~~
SIK
you can use the visualization to see exactly what makes up the health and
human services budget item, by double clicking on it. Then you can also see
the individual programs that make up medicare and medicaid.

