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.

Housing in the Golden State

I am headed out west, to California to talk housing at the Western Secondary Market Conference. After my talk they might post my slides online somewhere. If they do I’ll link to them, but for now you can get a preview in this twitter thread. Like many western states, California is facing a imbalance between housing supply and housing demand. Strong economic growth has bolstered demand, but supply has not kept up.

Jobs Friday May 2018

TODAY WAS JOBS FRIDAY. LET’s create a couple plots to show the trend in employment growth. Each month the U.S. Bureau of Labor Statistics (BLS) releases its employment situation report. Let’s make a couple plots looking at trends in U.S. nonfarm payrolls. Per usual, let’s make a graph with R. Data We can easily get the data via the Saint Louis Federal Reserve’s FRED database. If you followed my post from back in April of last year you know what we can do if we combine FRED with the quantmod package.

Expanding Expansions, Contracting Recessions

IN THIS POST I WANT TO SHARE A GRAPH looking at the length of economic expansions and recessions in the United State over time. Earlier today, Andrew Chamberlain (on Twitter), observed that at the end of this month the current economic expansion in the U.S. would be the second longest in history. Let’s explore. In the United States, the National Bureau of Economic Research (NBER) dates expansions and recessions. See for example http://www.

April 2018 Housing Market Update

LAST WEEK I POSTED A THREAD ON TWITTER COVERING RECENT HOUSING MARKET TRENDS AND THE OUTLOOK FOR MORTGAGE RATES: #Mortgage rates are now at their highest level since January 2014. Will these higher borrowing costs dampen the spring homebuying season? Some thoughts (+ charts)... — Leonard Kiefer (@lenkiefer) April 19, 2018 Let’s unpack that thread and add a few more charts I’ve tweeted out in the past week. I’ll also share some links to posts where I’ve shared R code on how to make the particular plots we discuss.

Charting Jobs Friday with R

LAST FRIDAY WAS JOBS FRIDAY, the day when the U.S. Bureau of Labor Statistics (BLS) releases its monthly employment situation report. This report is blanketed with media coverage and economist and financial analysts all over the world pay close attention to the report. The employment situation gives a read on trends in the world’s largest economy’s labor market. It also provides a clue about how monetary policy might unfold, affecting bond yields around the world.

Employment growth and house price trends

LET US TAKE A LOOK AT HOUSE PRICE AND EMPLOYMENT TRENDS. House prices in the Unitest States have been increasing at a rapid pace, about 7 percent on an annual basis. How does that relate to employment growth? And how do those trends vary by geography. Let’s take a look. Per usual, I will post R code and you can follow along. Data Following recent posts (see here and here for example), we will use the Freddie Mac House Price Index an Excel spreadsheet can be downloaded here.

February 2018 housing market update

EARLIER THIS WEEK I TWEETED out a poll asking whether or not folks wanted to see a thread/tweetstorm with slides from an upcoming presentation on the economy and housing markets that I’m giving. Over 90 percent voted for a thread. So I shared it. In this post let me add a little more commentary on the individual slides. Here’s the thread I ended up posting: Thread (0/5). I'm giving an update on economy, #housing and #mortgage market trends.

Plotting U.S. Macroeconomic Trends with FRED and R

LET’S TAKE A LOOK AT RECENT U.S. macroeconomic trends by making a couple plots with R code. Since we’re going to be looking at U.S. macroeconomic data, the data we’ll need is available in the St. Louis Federal Reserve Bank Economic Database FRED. Below I’ll walk you through creating the plots. Where are we in the business cycle After the BLS released their employment situation report (the Jobs report) last week I tweeted out:

Housing construction and employment trends

THE UNITED STATES IS NOT building enough homes to meet demand. Be sure to check out my upcoming presentation at Realtor University to learn more about whether or not this could mean a house price bubble. One reason often cited for low levels of construction is a lack of labor. How do construction trends compare to construction employment? Let’s take a look. Financial blogger Logan Mohtashami (Twitter, blog) tweeted out (he’s a power Twitter user so I’m not sure exactly when or where, so I probably saw it multiple places) an interesting observation on housing construction and employment (see blog post).

JOLTS a dataviz trilogy

LET’S TAKE A LOOK AT RECENT LABOR MARKET TRENDS IN THE UNITED STATES. Below we’ll plot labor market trends using the U.S. Bureau of Labor Statistics Job Openings and Labor Turnover Survey (JOLTS). Last year we looked at how to get the data and plot it using R. Look to that post for more details, though I’ll include all the code we need below at the bottom. A trilogy of plots First, let’s look at some static plots.

Recent trends in U.S. housing markets: 2017Q3 update

LET US REVIEW HOUSING MARKET TRENDS in the United States through the first three quarters of 2017. Economic background The overall economic environment remains favorable for housing. Interest rates are low, the labor market has been solid and income growth, while modest, has begun to tick up. Low mortgage rates For most of 2017 mortgage rates have declined. Rates entered the year above 4 percent for the 30-year fixed rate mortgage, but after peaking in March, declined through September.

A closer look at forecasting recessions with dynamic model averaging

BACK WE GO INTO THE VASTY DEEP. LAST TIME we introduced the idea of using dynamic model averaging to forecast recessions. I was so excited about the new approach that I didn’t take the time to break down what was going on with it. In this post we’ll look more closely at what’s happening with the dma packaged when we try to forecast recessions. Per usual we’ll do it with R and I’ll include code so you can follow along.

Forecasting recessions with dynamic model averaging

HERE THE LITERATURE IS VASTY DEEP. In this post we’ll dip our toes, every so slightly, into the dark waters of macroeconometric forecasting. I’ve been studying some techniques and want to try them out. I’m still at the learning and exploring stage, but let’s do it together. In this post we’ll conduct an exercise in forecasting U.S. recessions using several approaches. Per usual we’ll do it with R and I’ll include code so you can follow along.

Home sales in expansions and recessions

LET’S LOOK AT NEW HOME SALES. Today the U.S. Census Bureau joint with the Department of Housing and Urban Development (HUD) released new home sales estimates through September of 2017. New home sales have been grinding higher along with housing starts, though they dipped last month (maybe). This month’s report was the strongest since 2007, as I tweeted earlier today: New home sales in September highest since 2007. report: pic.

Unemployment Flexdashboard

IN THIS POST I WANT TO REVISIT FLEXDASHBOARDS. Back in January we made several Flexdashboards with R to display economic data. See my guide to building a flexdashboard for some examples. In this post, I want to use the tidyquant package to wrap some of the plots we made earlier into a flexdashboard. I’ll have more to say about this in the near future, but I just wanted to make a simple flexdashboard (partially to remind myself how to do it).

Forecasting is hard (work)

IN THIS POST WE WILL STUDY FORECASTS OF US ECONOMIC CONDITIONS. Niels Bohr quipped: Prediction is very difficult, especially if it’s about the future. I’m a macroeconomist by training, and my day job sometimes requires me to forecast the future so I can relate. Predicting the future can be quite difficult. In this post, we’ll analyze forecasts of economic conditions from professional forecasters using R to wrangle the data and construct plots.

Housing market recap

QUITE A LOT OF HOUSING DATA CAME OUT THIS WEEK. Let’s recap with some graphs. Mortgage rates back below 4 percent The 30-year fixed rate mortgage fell back below 4 percent this week. New home sales New home sales data was released and came in weaker than expected for April 2017. March has been an extremely strong number, so a decline was anticipated, but the drop was bigger than most expected.

Consumer prices, household debt

LET’S TAKE A LOOK AT RECENT TRENDS IN CONSUMER PRICES AND HOUSEHOLD DEBT. Along the way we’ll refresh some visualizations of consumer prices (see here) and household debt (see here) we made last year, as well as think up some new ones. As usual we’ll use R to generate the plots and I’ll share the code below. But before we get into the details of constructing the charts, let’s just look at two plots to help set the stage.

House price growth and employment trends

IN THIS POST I WANT TO REVIEW RECENT EMPLOYMENT AND HOUSE PRICE TRENDS at the metropolitan statistical area. No R code here, but you can recreate the graphs we’ll explore today by following the code in this post. This week the U.S. Bureau of Labor Statistics (BLS) released updated metro employment data (LINK) and Freddie Mac released its Freddie Mac House Price Index for over 300 metro areas as well as the 50 states, the District of Columbia and the United States.

Gather round and spread the word: Wrangling global house price data

IN THIS POST I WANT TO SHARE SOME R data wrangling strategy and use it to prepare an update to some global house price plots I shared last year. In last year’s post I did some data manipulation by hand and mouse in Excel before getting into R. In this post I’m going to use the newly updated readxl library to do the data manipulations entirely in R. If you follow along, then you should be able to use this code to recreate my graphs.

Hello Ninja! Crafting a browser-based presentation and how I got (re)started with R

I GIVE A LOT OF TALKS. Some are formal presentations or keynotes to large groups, while many are in small group settings. Sometimes I get impromptu requests so I have to be ready pretty much at all times to give some sort of talk. On this blog I’ve shared many different DATA VISUALIZATIONS which could be part of a talk. Many of the more complex visualizations-probably most of the animated gifs-wouldn’t work great in most presentation settings.

Wrangling employment data, plotting trends

We will get back to house prices soon. IN THIS POST I WANT TO EXPLORE EMPLOYMENT TRENDS at the state and metro area. Today the U.S. Bureau of Labor Statistics (BLS) released data on state and metro area employment trends. Last month we looked at unemployment trends. Today we’ll look at trends in nonfarm employment. Wrangling the data We will be importing, preparing, and plotting our data with R. We can get the data pretty easily using the files BLS prepares, though we have to do a little bit of work to organize the data.

Data visualizations for the week of September 22, 2016

IT WAS A BUSY WEEK FOR ECONOMIC AND HOUSING DATA this week. Below are some data visaulizations I made tracking key trends in economic and housing market data. Homeowner equity increases to $12.7 Trillion in the second quarter of 2016 With house prices rising by nearly 6 percent on a year-over-year basis, homeowners are building back equity. According to the Federal Reserve’s Flow of Funds, owners’ equity in real estate was $12.

Industry-specific Beveridge Curves

IN MY PREVIOUS POST we looked at the Job Openings and Labor Turnover Survey (JOLTS) data and plotted a Beveridge Curve. In this post I want to add some more code that allows us to plot Beveridge Curves by industry. For more on the analysis of industry-specific Beveridge Curves, see this paper published in the June 2012 Monthly Labor Review that decomposes shifts in the Beveridge Curve and looks at it by industry.

JOLTS! Job openings and labor turnover trends

IN THIS POST WE’LL LOOK AT recent job openings and hires data from the Bureau of Labor Statistics Job Openings and Labor Turnover Survey (JOLTS). R code for selected graphs posted below Job openings and labor turnover Total nonfarm trends Let’s start by looking at aggregate national trends for total nonfarm sector. The plot below compares hires, job openings and separations (the sum of quits, layoffs and discharges, and other separations) over time.

What we spend: Consumer Expenditures in 2015

.showopt { background-color: #004c93; color: #FFFFFF; width: 100px; height: 20px; text-align: center; vertical-align: middle !important; float: right; font-family: sans-serif; border-radius: 8px; } .showopt:hover { background-color: #dfe4f2; color: #004c93; } pre.plot { background-color: white !important; } EARLIER THIS WEEK THE U.S. BUREAU OF LABOR STATISTICS released data on consumer expenditures in 2015. In this post I want to examine these data and make a few visualizations. R code for graphs posted below

Recent economic and housing market trends: August 2016

.col2 { columns: 2 200px; /* number of columns and width in pixels*/ -webkit-columns: 2 200px; /* chrome, safari */ -moz-columns: 2 200px; /* firefox */ } .col3 { columns: 3 100px; -webkit-columns: 3 100px; -moz-columns: 3 100px; } IN THIS POST WE’LL REVIEW some recent economic and housing market trends. R code for graphs posted below Low mortgage rates Mortgage rates remain low, with the 30-year fixed mortgage averaging 3.

Data swarms: Your firearms are useless against them!

AUGUST IS ALMOST OVER, and it’s nearly back to school season. And that means one thing. No, not that we’re about to get a chance to watch the #1 NCAA football program of all time dominate the gridiron (though that’s awesome too). No, it’s data release season! A data swarm is on its way. From American Community Survey to the American Housing Survey to the annual Home Mortgage Disclosure Act Data many statistical data releases come out in September and October.

Consumer Credit Trends Part 2: Data doesn't drive, it's lucky to be in the car

.col2 { columns: 2 200px; /* number of columns and width in pixels*/ -webkit-columns: 2 200px; /* chrome, safari */ -moz-columns: 2 200px; /* firefox */ } .col3 { columns: 3 100px; -webkit-columns: 3 100px; -moz-columns: 3 100px; } A FEW DAYS AGO I POSTED on trends in household debt using data from the the New York Federal Reserve Bank’s Consumer Credit Panel. The post got many responses, some observing that while student debt has grown a lot the absolute level of it is small relative to mortgage debt.

Consumer Credit Trends

TODAY the NEW YORK FEDERAL RESERVE BANK released its Quarterly Report on Household Debt and Credit. These data come from the Center for Microeconomic Data based on credit records from Equifax. R code for the graphs are posted at bottom of page Trends in household debt balances One of the key statistics tracked in the report (full data can be found here) is household debt balances. They break debt balances out by loan type:

Brexit, State of the Nation's Housing, and home sales: the week in charts.

IT WAS A BUSY WEEK FOR ECONOMIC AND HOUSING DATA. Existing and new home sales came out, the Joint Center for Housing Studies of Harvard University released their annual State of the Nation’s Housing, and the U.K. voted to leave the European Union (the Brexit). We’ll recap these data and events through charts I’ve created and shared throughout the week. In this post, I’ll share each of the charts with some commentary, and then below, I’ll include the R code I used to generate the charts.

House price data viz

TO HELP UNDERSTAND TRENDS in house prices, I have a couple of data visualizations for the Freddie Mac house price index. Viz 1: House Price Dynamics The first compares the quarterly and annual appreciation for house prices across the 50 states plus the District of Columbia. In this visualization, each dot represent a state (or D.C.). The horizontal X axis measures the quarter-over-quarter annualized percentage change in the Freddie Mac house price index.

Vacant housing: from surplus to shortage

EARLIER THIS WEEK the Census Bureau released the latest Housing Vacancy Survey (HVS) data for the first quarter of 2016. Much attention went to the homeownership rate estimates, which showed a decline in homeownership rates near a 48-year low. The gif below shows the history of the homeownership rate as estimated by the HVS. And here’s a still image of the same data: Vacancy rates In addition to the homeownership rate, the HVS data contained estimates of both the homeowner and rental vacancy rates.

The week that was in charts

THIS WAS A BUSY WEEK for housing data. On Monday, the NAHB released the NAHB/Wells Fargo Housing Market Index (HMI), which tracks home builder sentiment. On Tuesday we got New Residential Construction from Census/HUD which gives us housing starts and permits. On Wednesday we got Existing Home Sales (EHS) from the National Association of Realtors. And on Thursday (along with mortgage rates), we got the FHFA House Price Index.

Data Viz: Occupation Wages and Regional Cost of Living

A new data viz TODAY THE BLS released data on metro level wages, employment concentration and regional costs of living. I put together a quick plot and sent out the following tweet: Today @BLS_gov released data combining price-adjusted wages and employment concentration. I looked at economists… — Leonard Kiefer (@lenkiefer) April 14, 2016 This post provides a link to interactive versions of the same plot and a discussion.

Real house prices and population growth

EARLIER THIS WEEK the U.S. Census Bureau released updated population figures for 2015. These data revealed changes in population across the country. Jed Kolko published a nice summary of these data, and it got me thinking about the relationship of population growth rates and house prices. In this post I want to consider a few key things I found by exploring these data. First, let’s have a look at the history of real house prices, relative to the year 2000 for 30 large metro areas:

Tight Inventory: Data Viz Remixed

Tight Inventory EARLIER THIS WEEK, Trulia published a post by Chief Economist Ralph McLaughlin called “House Arrest: How Low Inventory Is Slowing Home Buying”. The article analyzed trends in housing inventory. Trulia broke housing inventory into “starter homes”, “move-up homes”, and “premium homes”. They found that the inventory of available homes for-sale has shifted towards premium homes and away from starter homes that first time homebuyers would typically be buying.

The week (so far) in charts

Mid-week chart update With existing home sales, house prices, and new home sales being released, this is one of the busiest weeks of the month for housing data. We’ll catch new home sales tomorrow morning, but let’s catch our breath and recap what we’ve learned so far this week. Existing home sales disappoint The National Association of Realtors (NAR) reported on existing home sales (EHS) on Monday. Existing home sales for February surprised most by dropping 7.

The week that was in charts

This past week I tracked several data releases that give us an idea of the health and vibrancy of the economy and housing markets. State employment trends positive Consistent with the national employment numbers state employment trends are positive. The BLS reported on employment trends by state for January 2016 this week. Eleven states plus DC had a statistically significant month-to-month increases in employment and five states experienced month-to-month declines.

What the February jobs numbers mean for housing

Resilient job growth SPRING IS ALMOST HERE, and housing market activity will start to accelerate as we enter the peak homebuying season in the spring and summer months. The latest jobs report shows the U.S. labor market continues to pick up steam, adding 242,000 jobs month-over-month and beating expectations. Job growth has been resilient since the end of the Great Recession in June 2009, with monthly job growth averaging over 200,000 since 2011.

Recent House Price Trends

{% include JB/setup National house prices rise 6.2% Freddie Mac released its full year 2015 house price index and an interactive data visualization. The seasonally-adjusted national index increased 6.2 percent year-over-year and is now 29.6 percent above the post-recession low, and just 4.1 percent below the (nominal) pre-recession peak (see graph below). While national house price growth has been strong, there is considerable variation across the country. Some states and metro areas are already well above their pre-recession (nominal) peak, while other still have lots of ground to make up.

Annotated Data Viz 2

BELOW IS A VISUALIZATION of household size and composition and homeownership from the Census1 going back to 1980. With this visualization, we can see how household size and tenure choice (own vs rent) has varied by age over time. 1Data from Ipums: IPUMS-USA, University of Minnesota, See my data visualizations on Tableau Public

Annotated Data Viz 1

Homeownership and the Jobs Outlook BELOW IS A VISUALIZATION of job growth and homeownership by occcupation. This viz details expected job growth by occupation compared to homeownership rate by occupation. This viz was originally published on This viz shows compares variation in homeownership rates by occupation with expected job growth for those occupations. The size of the bubbles correspond to the expected number of job openings for that occupation.

How I make my mortgage rates gif

{% include JB/setup Making a data viz SOMETIMES ANIMATION CAN BE USEFUL, though it is often misused. I’ve been tracking the week-to-week changes in mortgage rates, and animating with a GIF. Example animated gif with mortgage rates from 1/1/2013 to 3/10/2016 I build my gif using the R statistical package. Perhaps I’ll explain more of the details later, but the R code below uses the ggplot2, ggthemes and animation packages to create the plots, style them, and save the animation.

The week (so far) in charts

Mid-week chart update THERE HAVE NOT been a lot of data releases this week, but that’s no excuse not to get busy charting. I tweeted out several charts so far this week. Here’s a recap of my favorites for this half-week. Are wages increasing…or is it merely a trick of the light? We got this week’s charting started with some data from last week. The jobs report came out last Friday (see our discussion from last week) .

The week ahead: housing starts and housing market index

{% include JB/setup The week ahead Next week there are several data releases but the two that I’m paying especially close attention to are the NAHB/Wells Fargo Housing Market Index (HMI) and Housing Starts, part of the New Residential Construction joint release by Census and HUD. Will builders maintain their sunny outlook? The HMI is a diffusion index based on survey questions about homebuilder’s attitudes. Values of the index above 50 indicate that on balance, more respondents feel positive than negative about the current conditions in and direction of the single-family housing market.