Len Kiefer

Helping people understand the economy, housing and mortgage markets

A Flatter Phillips Curve

Supply and demand, isoquants, indifference, the lists goes on. Economists love curves. One attracting extra attention these days is the Phillips curve. Last week I was in Boston for the annual meeting of the National Association for Business Economics (NABE). The overall conference was quite good, and certainly one of the highlights was a lunchtime speech by Federal Reserve Chairman Jerome Powell. You can find the speech here (pdf). In this post I want to replicate Powell’s Figure 5, which presents evidence of the evolution of the Phillips Curve.

U.S. housing supply and demand

In this post I want review some trends in U.S. housing supply and demand. Specifically I want to look at county level trends in population, housing supply (the total number of housing units) and house prices. We’ll uncover some interesting trends. Per usual we will make our graphics with R. Preparing the data required several steps that I will outline in a follow up post. For now we’ll just proceed with the data I’ve put together.

JOLTS update

It’s been a while since I posted here. I’ve got some longer form things in the works, but let’s ease back into it. Let’s take a look at the latest Job Openings and Labor Turnover Survey (JOLTS) data via the U.S. Bureau of Labor Statistics. This post is an update of this post. Per usual we will make our graphics with R. First, let’s look at aggregate trends. There are a lot of job openings, but hiring has not accelerated.

Facets in space and time

My studies involve a lot of data organized in space and across time. I look at housing data that usually captures activity around the United States, or sometimes the world, and almost always over time. In my data visualization explorations I like to study different ways to visualize trends across both space and time, often simultaneously. Let’s consider a couple here in this post. Per usual we will make our graphics with R.

Everything is spiraling out of control!

I saw this fun bit of R code in a tweet by user aschinchon. df <- data.frame(x=0, y=0) for (i in 2:500) { df[i,1] <- df[i-1,1]+((0.98)^i)*cos(i) df[i,2] <- df[i-1,2]+((0.98)^i)*sin(i) } ggplot2::ggplot(df, aes(x,y)) + geom_polygon()+ theme_void()#rstats pic.twitter.com/cgNjyk405f — Antonio S. Chinchón (@aschinchon) August 16, 2018 Let’s remix it to make a fun animation. We’ll zoom in and out and have the colors shift. Click for R code suppressPackageStartupMessages({ library(tidyverse) library(tweenr) library(gifski) library(viridis) }) df <- data.

Core Inflation Viz with Progress Bar

About a year ago I shared code for a dataviz with a progress bar. Let’s update that R code using gifski and tweener. The code below will generate this animated gif: Gif code. Click for details. # CPI VIz with progress bar---- # set up your directory mydir <- "PATH_TO_YOUR_DIRECTORY" # libraries ---- library(data.table) library(tidyverse) library(tweenr) library(gifski) library(ggridges) library(extrafont) library(scales) library(cowplot) # make plots ---- # Get data----- # CPILFESL is FRED mnemonic for CPI: All Items Less Food and Energy # https://fred.

State employment dataviz

Today was JOLTS Tuesday, when the U.S. Bureau of Labor Statistics releases updated data from the Job Openings and Labor Turnover Survey. I was talking about it earlier today, but before we get into that… If you care about dataviz check this out I saw this on Twitter today via Jon Schwabish. Link to a handy dataviz cheatsheet outlining Jon’s core dataviz principles. Prints out nicely on pdf. Back to the JOLTS.

Charts within charts

Maybe you are of the opinion that charts should have their y axis extend all the way down to 0, even if the data live far away from zero. I’m not sure if that’s always the right thing to do. But if you are strict about this, how can you use the space? One thing I experimented with in my Mortgage rates in the 21st century post was filling the area under a line with progressively fainter area.

Global house price trends

In this post I want to share updated plots comparing house price trends around the world. Or at least part of the world. Our view will be somewhat limited, based on data, but will at least allow us to see how U.S. house prices compare to a few other countries. The details behind these plots are explained in more detail in this post, but some of the images were lost due to my blog transition.

House price gif that keeps on giffing

This tweet turned out to be popular: 👀house price trends👀 pic.twitter.com/JXB5P0H84A — Leonard Kiefer (@lenkiefer) August 1, 2018 It’s a remix of a chart we made here, though it uses a different index. In the earlier post, we used the FHFA house price index, but this one used the Case-Shiller Index, which was released today. Let me just post two gifs and then below will be the R code I used to create them.