Len Kiefer

Helping people understand the economy, housing and mortgage markets

State unemployment rate dataviz

A couple years ago I posted R code for a remix of a remix of a US state unemployment rate chart. Post Working on a workout. Some of the images were lost in a blog transition. We’ll update below. Here’s an updated version: And another remix focusing just on April 2020 (latest data). R code ###################### ## Load Libraries ## ###################### library(data.table) library(quantmod) library(tidyverse) library(geofacet) # Download data big file ur.

Tornado Charts

Earlier this week, I made a boss chart: https://t.co/6wf40jtqHI pic.twitter.com/xlv3Uzpiv0 — πŸ“ˆ π™»πšŽπš— π™Ίπš’πšŽπšπšŽπš› πŸ“Š (@lenkiefer) May 12, 2020 While listening to Chart Chat I heard Jeffrey Shaffer, Steve Wexler, Amanda Makulec, and Andy Cotgreave discuss tornado charts. I decided it might be a good idea to make one. Because I’m not sure I can trust with the awesome power inherent in these charts I won’t post R code here.

Mortgage rates hit a record low

This week the Freddie Mac Primary Mortgage Market Survey reported a record low for the U.S. weekly average 30-year mortgage rate. First some charts, then below I post R code. R code Load libraries library(fredr) library(tidyverse) library(patchwork) library(cowplot) library(gganimate) library(lubridate) # updated You’ll need a custom color scale (see below for code). R code to wrangle data data preparation code source(paste0(mydir,"len_color_scales.R")) #custom color scale code copied below fredr_set_key("YOURKEY") df <- fredr(series_id = "MORTGAGE30US", observation_start = as.

Last Summer This Spring

Earlier this week I gave a talk and used this picture to compare myself last summer to this spring. Some key differences. Last summer I was: clean shaven provoking bears This spring I am: sporting a quarantine beard dealing with sassy autofill Despite what autofill was suggesting I think there’s some reason for optimism, though no doubt recent weeks have been tough. Last summer, when I took the photo with the bears, I was up in New York City.

The US economy in lockdown

The past week we started to get monthly economic data from March, after the U.S. economy shut down to battle the COVID-19 pandemic. The results were sobering. We already knew the US labor market was in a tough spot. But last week we got data for housing starts and retail sales which showed the size of the economic contraction. Below are some charts I posted to Twitter last week.

Updated Favorite Data Visualizations

I’ve decided to create a post where I can regularly update some favorite data visualizations. Where I’ve previously discussed the data or shared code I will provide a link. Often I’ll update the charts and post them on Twitter soon after the data is released. I won’t be updating these that quickly, but I’ll do my best to keep up. As I update some more charts I may add to the list.

US Labor Market Update

Today the U.S. Bureau of Labor Statistics released its monthly employment situation summary for March 2020. While many were expecting the U.S. labor market to show some weakness as the U.S. economy shuts down to battle COVID-19, the magnitude of the contraction surprised many. Because the reference week for the employment report was March 8th through March 14th, before the nationwide shutdown took full effect, many were expecting a relatively mild report.

30 sigma

Earlier today I tweeted out a chart of the U.S. Labor Department’s estimate of initial jobless claims Link to pdf report. weekly jobless claims, a 30Οƒ event pic.twitter.com/LEO7s5TXsH — πŸ“ˆ π™»πšŽπš— π™Ίπš’πšŽπšπšŽπš› πŸ“Š (@lenkiefer) March 26, 2020 Below I share R code to generate a chart like the one above. We can get data from the St.Β Louis Fed’s Federal Reserve Economic Data (FRED). Then it’s easy to make an animation.

Map of maps

On Friday a colleague showed me an interesting chart, a map of maps. I believe the original was made in Tableau, but I decided to spin one up in R. I tweeted out the picture: A map of maps, showing the correlation between state house price growth rates You see pretty strong spatial correlation, with some interesting exceptions. Florida correlated with AZ, NV pic.twitter.com/9hzwZLkb41 — πŸ“ˆ π™»πšŽπš— π™Ίπš’πšŽπšπšŽπš› πŸ“Š (@lenkiefer) March 6, 2020 In this post I will supply the R code to make one.