« When an industry is imploding, lets focus on a metric that remains constant | Main | Light entertainment: which number is larger »



It's not just at Calculated Risk. There's more of these recession trackers at the FRB-Minneapolis site.

One of the nice things about their versions is that you can click to add/subtract various recessions.

I've been using these in my forecasting class to illustrate cyclicality.


Or, inexplicably, is receiving management and we find that central management of people's lives doesn't make sense? And find that giving money to politician's to give out just gets the money to favored groups and is quickly taken up in bureaucracy?


zbicyclist: Yes, that chart is everywhere nowadays. I'm annoyed that it is much harder to make in a statistical package than in Excel.


Excellent example of taking a good chart and making it great by clarifying and simplifying.

It does a great job of stating a very important message.

On the subject of New York though, I don't understand what's baffling. When you have large numbers of people displaced from their homes or without heat because of a hurricane, and you throw in major winter storms...that's a crisis.

Hadley Wickham

Not only would that chart be easy to create in R, it'd be easier to reuse in the future, and we could easily inspect your code to see if you made any mistakes.

Dean Eckles

This chart would be quite easy to create in R actually -- especially using Hadley's plyr package (though built in functions make it pretty easy too).


Hadley and Dean: I'm sure you're better with R than most of us so I'd love to hear more. I have two separate issues with this task:

1) assuming I know exactly the chart to build, and have all the right data elements, it is still much easier to use Excel than any coding language. This is true even if I have to update the chart month after month like CR blog has to. I see this as a challenge to those creating graphing software. (PS. Here, I'm thinking about the original CR version - I don't think that one can easily make small multiples in Excel.)

2) I don't see a straightforward way to proceed in R (or other statistical languages) from grabbing the employment level data from the BLS website, and having the data formatted precisely for the chart I made. Perhaps one of you can give us some pseudo-code to walk through how you might do it. I think it's easier to think about it than to actually do it.


Here is fast way to download data from this website using R and plot it with ggplot2.

Every plot which is made in Flash has a XML file which contains data. Firebug in Mozilla or Developer Tools in Chrome is very useful to find it out.

In this case direct link to data for employment change is below:


To get it directly to R. We can use XML package to parse this file.

library(XML) #to parse xml file
library(reshape2) # to transform data for ggplot2


Now we have data in xml, then we shoud transform it to data.frame:

then we add ID for months

Transform it into data frame for ggplot2

Then, if we want to, change names

We should change class of variable Employment (it is character)

Now we can plot it with ggplot2.
ggplot(data=data.long,aes(x=Months,y=Employment,colour=Crisis)) + geom_line()

The comments to this entry are closed.


Link to Principal Analytics Prep

See our curriculum, instructors. Apply.
Kaiser Fung. Business analytics and data visualization expert. Author and Speaker.
Visit my website. Follow my Twitter. See my articles at Daily Beast, 538, HBR.

See my Youtube and Flickr.

Book Blog

Link to junkcharts

Graphics design by Amanda Lee

The Read

Keep in Touch

follow me on Twitter