BW #54: Household debt
How much money do Americans owe, and for what? This week, we examine the NY Federal Reserve's latest report on household debt and credit.
Debt is a fixture of the modern world: We borrow money to start businesses, to buy houses (mortgages), to buy cars, and (in some countries) to get a university education. Even more convenient than applying for a loan, we can often use a credit card; so long as we pay back the balance in a short period of time, we're not in any trouble.
The New York Federal Reserve is home to the "Center for Microeconomic Data," which researches (among other things) the kinds of debt and credit that Americans hold. Last week, they came out with their latest Household Debt and Credit report, which covers through the fourth (and final) quarter of 2023.
This week, we'll look at the data that they used to create their report. Along the way, we'll get a better understanding of what kind of debt Americans have, how their debt load has changed over the years, what they owe money on, and in which states people (on average) owe the most.
Data and six questions
The NY Fed's HHDC report, including background information, is here:
https://www.newyorkfed.org/microeconomics/hhdc
You can download the specific report about household debt and credit as a PDF file:
The data on which the report is based, and which we'll be using this week, is in the form of an Excel spreadsheet:
https://www.newyorkfed.org/medialibrary/interactives/householdcredit/data/xls/HHD_C_Report_2023Q4
A data dictionary describing the data is downloadable from:
I have six tasks and questions for you this week. The learning goals include: Importing data from Excel into Pandas, cleaning data, plotting, grouping, and window functions.
I'll be back tomorrow with my detailed solutions and Jupyter notebook.
Meanwhile, here are this week's questions and tasks:
Create a dictionary of data frames from the Excel spreadsheet; the keys should be the sheet names from the Excel file, and the values should be data frames containing the data. Only keep those with the word "Data" in their names. Make sure that each data frame's column names are taken from the sheet, and that the first column is turned into the index.
From the data frame describing the chart on page 3 of the report, create a stacked bar plot replicating that chart. Use the same colors as the NY Fed's chart. Show all of the index values (on the x axis), but rotate them 60 degrees, make the chart larger, and the font size smaller, so that all are visible.
Keep reading with a 7-day free trial
Subscribe to Bamboo Weekly to keep reading this post and get 7 days of free access to the full post archives.