I AM WORKING ON ADDING some more analysis around mortgage origination trends (see here for a high level summary).
It’s on the way, but let me just leave a few graphs for you. These are updated versions of the same ones we made last year.
These infographics show the distribution of mortgage loan amounts by state/county and metro area.
For the beeswarm plots (see for example, Flowing Data) plots I have randomly sampled 2,000 loans from each state/metro area.
I’ve BEEN MESSING AROUND MORE WITH R and OFFICER and having too much fun for a Monday. I’m going to dive into some details later, but I’ll just leave a couple files here.
See the attached PowerPoint .pptx file for all the charts.
Here’s a gif version I started with:
Then after I created the PowerPoint I started messing around with the drawing tools and made increasingly ill-advised edits.
IT IS SEPTEMBER AND THAT MEANS it is data release season. One of the most important September data releases for me is the annual HMDA data release.
These data provide the closest thing to a publicly-available comprehensive summary of U.S. mortgage market activity that we’ll get (for right now). The recently released data is for 2016 and provides a detailed view of mortgage market activity across the country. Let’s take a look.
IN THIS POST I WANT TO GO THROUGH SOME EXAMPLES of using the purrr package for R.
Now there are already some great examples of how to use purrr. If you’re brand new to purrr (like I was not long ago) probably start with Jenny Bryan’s Purrr tutorial then see R for Data Science and also this presentation from rstudioconf (pdf). You can also check out this curated collection via Mara Averick (on Twitter: dataandme ) for a bunch of examples.
NEW HOME SALES FALL according to the latest new residential sales report from the U.S. Census Bureau and Department of Housing and Urban Development (HUD).
errr probably.
Remember, housing data is uncertain and there’s quite a large margin of error. Per the Census/HUD report sales fell 3.4 percent, but with a confidence interval of plus or minus 13 percent. Here’s a chart with the line showing the estimate and the shaded area the confidence interval around that estimate.
IN THIS POST I WANT TO SHARE SOME R CODE to create charts of U.S. housing starts we studied last week.
Get data
We’ll use tidyquant (see e.g. this post for more) to go get our data from the St. Louis Federal Reserve Economic Database (FRED). We’ll also use cowplot to arrange multiple ggplot2 graphs on one page.
Let’s load libraries and grab the data.
#####################################################################################
## Step 0: Load Libraries ##
#####################################################################################
library(tidyquant)
library(tidyverse)
library(cowplot)
library(lubridate)
library(scales)
library(ggridges) # replaces ggjoy
#####################################################################################
## Step 1: Prepare for data ##
#####################################################################################
tickers=data.
LOOK I DON’T HAVE ANYTHING BAD TO SAY about PowerPoint. Others have said it (see for example Tufte and Harvard Business Review). It’s a tool and a fact of life for many of us.
I am interested in making better PowerPoints. In this post we’ll use some R tools to generate a PowerPoint deck.
OfficeR
The package officer allows you to access and manipulate ‘Microsoft Word’ and ‘Microsoft PowerPoint’ documents from R.
THIS WEEK WAS BUSY, with a lot of data releases. Earlier this week we talked about housing starts, but there were a bunch of other key releases. Let’s review some of them here.
We’ll just do a quick description of the data and then follow up with a static chart and an animated gif.
Mortgage rates are still super low
U.S. weekly average mortgage rates ticked up this week, but remain down from the start of the year.
ARE HOUSING STARTS GRINDING HIGHER, OR GRINDING TO A HALT?
Today the U.S. Census Bureau joint with the U.S. Department of Housing and Urban Development published updated estimates of housing starts through August of 2017. Per the report privately-owned housing starts in August were at a seasonally adjusted annual rate of 1.18 million, down 0.8 percent from July’s revised estimate and up 1.4 percent from a year ago. Neither the month-over-month or year-over-year changes were significant.
LET’S WRANGLE SOME HOUSING DATA.
We’ll try something different with how posts are organized. In the past I have generally mixed data wrangling, R code and graphs all in one post. Now I’m going to break it up. Posts like yesterday will just show some data and discuss it. Then, if the data wrangling or code is complicated enough I’ll follow up with another post with details.
You’ll be able to find all my posts on data wrangling, under the data wrangling tag and R code under the R tag.