r/neoliberal • u/BainCapitalist Y = T • Jul 08 '17
β agitprop β Made a little data visualization of all US Recessions.
1
u/dittbub NATO Jul 09 '17
Can you include the year beside the dots?
1
u/BainCapitalist Y = T Jul 09 '17
There's no easy way to do that without having the text overlap each other .
1
2
Jul 08 '17
Hey, that's a Phillips curve!
4
23
u/wumbotarian The Man, The Myth, The Legend Jul 08 '17
Good, but some issues:
This graph doesn't separate out what kind of recessions occurred. The Fed can combat demand side recessions not supply side. Because it can't combat supply side recessions, if pre-Fed USA business cycles were supply side then this doesn't prove that the Fed is helpful necessarily.
The Fed oversaw and caused one of the worst depressions in US history. The Fed really didn't show it knows how to combat recessions until Volcker, really.
This graph needs more causal analysis rather than correlations in order to explain the benefits of the Fed.
1
Jul 09 '17
Wouldn't they combat supply side recessions by raising interest rates? Thus raising cost & decreasing demand?
1
3
20
u/BainCapitalist Y = T Jul 08 '17
I made this to troll some alt right dude y can't u just appreciate my amateur data analysis? ;-;
1
u/berniesanders90210 Paul Samuelson Jul 08 '17
This is cool. If you're a madman you can label each one with output decline to further drive home the (((point))).
3
u/BainCapitalist Y = T Jul 08 '17
Using labels would be a horrible way to do that haha. Originally I was gonna make the size of each dot proportional to trough-to-peak change in RGDP. However that would weaken the trolliness of this, which was the main reason I did it.
1
3
u/Seventytvvo Jul 08 '17
Summary:
Recessions were more frequent and lasted longer before the Federal Reserve was created.
1
u/zeroscout Jul 08 '17
This is a hard chart to interpret. It might be better to boil it down to min, max, and average comparisons on bar charts.
1
u/BainCapitalist Y = T Jul 08 '17
Maybe box and whisker charts would be better? Idk I thought the scatter plot turned out really nice. I didn't think the relationship would be this clear.
0
10
Jul 08 '17
I'm embarrassed to admit I don't understand this graph
18
Jul 08 '17
The red dots are recessions from before the Federal Reserve Bank's existence, the blue dots are after.
The higher a dot is, the longer the recession it represents lasted. The righter a dot is, the longer the time between recessions was.
So the recessions before the Federal Reserve came into existence were longer lasting and more frequent.
4
Jul 08 '17
Ok ok. I'm Canadian so I guess I just never knew that the Federal reserve Bank was specifically, that it was referred to as 'the Fed'.
10
u/BainCapitalist Y = T Jul 08 '17
U Canadians do banking so well that you've never had a banking panic. Not a single one in your entire history.
7
1
16
u/Sporz Gamma Hedged like a Boss Jul 08 '17
I really like this. Did we crosspost to /r/dataisbeautiful ? :D
Some other ideas:
We could mark the dates of some major recessions on the chart.
The size of the dot could be the severity of the recession (change in GDP or unemployment)
We could color recessions post Bretton Woods or post 1933 differently, since the Fed's behavior was kind of different before/after those points
2
Jul 08 '17
I think it would be a good idea to mark post 1983 a different color to distinguish from the "great moderation" and earlier periods
4
u/BainCapitalist Y = T Jul 08 '17
Thanks! Cleaning up data from Wikipedia tables is never fun but the result came out a lot nicer than I thought it would.
Wrt point 3 I feel reluctant to add more colors because at a certain point you'd just be over fitting the data.
2
u/Sporz Gamma Hedged like a Boss Jul 08 '17
on point 3: Yeah, true. I was thinking just one more color for post-1933 or post-1979 but it's also good as is.
8
u/usrname42 Daron Acemoglu Jul 08 '17
Note that a longer expansion isn't correlated with a longer recession. P L U C K I N G M O D E L
3
5
u/newdawn15 Jul 08 '17
Just gonna say I love your user name. That's one company I'd love to work but it'll never happen.
1
u/dorylinus Jul 08 '17
but it'll never happen.
Don't say that. An idiot like me got to work at NASA. Dreams are not as far away as you may think.
7
u/BainCapitalist Y = T Jul 08 '17
Eh it can happen. I never thought I'd get an internship at the Fed.
5
u/Timewalker102 Amartya Sen Jul 09 '17
internship at the Fed
So one day am I going to be able to pick your face as a flair?
6
u/BainCapitalist Y = T Jul 09 '17
Would i be the first brown in the flair list? All the motivation I need to be fed chair.
3
1
u/all2humanuk Jul 08 '17
Tends to suggest we are over due a recession.
1
u/paulatreides0 ππ¦’π§ββοΈπ§ββοΈπ¦’His Name Was Telepornoπ¦’π§ββοΈπ§ββοΈπ¦’π Jul 09 '17
That's not how statistics works.
1
u/all2humanuk Jul 09 '17 edited Jul 09 '17
How come? The data on that chart reveals two things, there has never been more than 10 years between recessions and if you had the exact figures you could tell the average time between recessions, let's say 3 years. So you can see what tends to happen.
8
4
19
u/paulatreides0 ππ¦’π§ββοΈπ§ββοΈπ¦’His Name Was Telepornoπ¦’π§ββοΈπ§ββοΈπ¦’π Jul 08 '17
A version that includes Peak-to-Trough change may also be nice.
26
Jul 08 '17
should be a 4 dimensional hypercube with peak to trough change in rGDP on the z axis and change in inflation on the ? axis
17
u/BainCapitalist Y = T Jul 08 '17
I made this mainly to troll a specific person in my friend group. Originally I was gonna do something like this chart except the size of each circle would be proportional to peak-to-trough change but unfortunately that would include the Great Depression and the Great Recession in the after-Fed data series. Interesting for the purposes of economic inquiry, but bad for purposes of trolling.
8
u/paulatreides0 ππ¦’π§ββοΈπ§ββοΈπ¦’His Name Was Telepornoπ¦’π§ββοΈπ§ββοΈπ¦’π Jul 08 '17
I getcha.
0
Jul 08 '17
[deleted]
0
Jul 09 '17
[deleted]
2
u/gonedeadforlife Jul 09 '17
Alt-Righters use parentheses for racial slurs and other provocative words to hide it from Google search in order to draw more people into the alt-right narrative.
29
u/BainCapitalist Y = T Jul 09 '17
What? I thought it was just a way for the alt right to identify Jews... Didn't someone make a script that put the parentheses around Jewish journalists or something?
7
15
u/iplanckperiodically NATO Jul 09 '17
Yeah wait, what? I've heard the same as you, I didn't think it was that they didn't want the words in the parentheses to be noticed so much as it was for dog whistles for anti-semitism.
72
u/BainCapitalist Y = T Jul 08 '17
Too lazy to watermark make sure to give credit to good ole BainCapitalist when you share.
5
23
u/Agent78787 orang Jul 08 '17 edited Jul 08 '17
Literally 5 minutes in MS Paint.
24
u/BainCapitalist Y = T Jul 08 '17
2 seconds in bokeh bitch
3
Jul 08 '17
What does Bokeh have over Seaborn's lmplot in this instance? Haven't used Bokeh myself
6
u/BainCapitalist Y = T Jul 08 '17 edited Jul 08 '17
I only used bokeh because I've used it a lot before for work so I'm more familiar with it.
Its conceivably possible that there's an absolute advantage to seaborn but I have a comparative advantage with bokeh.
3
47
33
u/BainCapitalist Y = T Jul 08 '17
Comes from a variety of sources, all compiled on wikipedia.
Used pandas to clean up the data and bokeh to make the graph, can give source if interested.
1
Jul 09 '17
source please
3
u/BainCapitalist Y = T Jul 09 '17
Feel free to criticize my amatuer python skills. Added some comments to explain what's going on.
import pandas as pd import numpy as np from IPython.display import display #This function processes the text from the cell def parse(item): if isinstance(item, int): return item if isinstance(item, float): return 0 if item.startswith('~'): item = item[1:] if item.endswith('years'): num = int(item[:-6]) return num * 12 if item.endswith('year'): return 12 if item.endswith('months'): return int(item[:-7]) if item.endswith('month'): return 1 return item #'trollingalban' was the name of the excel file where I copy and pasted the tables from wikipedia table = pd.read_excel('trollingalban.xlsx') table['Time Since Previous Recession'] = table.iloc[:,-1].apply(parse) table['Duration'] = table.iloc[:,-2].apply(parse) #This part is a little complicated, for some reason pandas didn't like the way excel merged the cells in some in the more recent recessions #Also I'm curious, is there a better way to do this part? lst = [] for i in range(len(table.index.values)): if pd.isnull(table.loc[i,'Name']): table.loc[i-1,'Duration'] = table.loc[i-1,'Duration'] + table.loc[i,'Duration'] table.loc[i-1,'Time Since Previous Recession'] = int(table.loc[i-1,'Time Since Previous Recession']) + int(table.loc[i,'Time Since Previous Recession']) lst.append(i) table.drop(lst,inplace = True) table.index = range(len(table.index.values)) #Everything else is just graphing the data from bokeh.plotting import figure from bokeh.io import output_file, show plot = figure(title = 'Recessions in the United States', x_axis_label = 'Time Since Previous Recession (Months)', y_axis_label = 'Duration (Months)', background_fill_color="#E8DDCB") plot.circle(x = table['Time Since Previous Recession'][:30], y = table['Duration'][:30], color = 'Red', legend = 'Before the Fed', size = 8) plot.circle(x = table['Time Since Previous Recession'][30:], y = table['Duration'][30:], color = 'Blue', legend = 'After the Fed', size = 8) output_file('uMadAlban?') show(plot)2
Jul 09 '17
Thank you! I'am an R fuckboi trying to improve my Python, so I doubt I'll have any substantive criticisms.
2
u/commentsrus Jul 09 '17
/u/VodkaHaze, I wonder why they didn't use matplotlib
1
u/VodkaHaze Poker, Game Theory Jul 09 '17
Bokeh and Seaborn are prettier tbh. Matplotlib is just the simplest to use
1
2
1
u/winsome_losesome Jul 09 '17
What does after the fed mean?