The inexorable growth of student debt, charted with R

[This article was first published on Revolutions, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Len Kiefer, Deputy Chief Economist at Freddie Mac, recently published the following chart to his personal blog showing household debt in the United States (excluding mortgage debt). As you can see, student loan debt has steadily increased over the last 13 years and has now eclipsed all other forms of non-mortgage debt:

Student debt

He also created this animated chart showing the growth (and occasional decline) of all forms of debt (including mortgages). All categories are scaled to the same nominal value in March 2003, and since that time student debt in the US has more than quintupled.

Debt balances 2016Q2

Both charts were created using the R language (the code is included in the blog post linked below). The data come from the New York Federal Reserve, which Robert reads into R using fread from the data.table package. The line charts were created using the ggplot2 package, with the ggrepel extension to keep the labels from overlapping. The animated version was created using the saveGIF function of the animation package.

For more charts (including some interesting by-state charts) and the complete details on the implementation, follow the link to Len's blog below.

Len Kiefer: Consumer Credit Trends (via Sharon Machlis)

To leave a comment for the author, please follow the link and comment on their blog: Revolutions. offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)