How housing prices have increased around the world

December 12, 2016

(This article was first published on Revolutions, and kindly contributed to R-bloggers)

Len Kiefer, Deputy Chief Economist at Freddie Mac, recently posted an analysis of global housing price trends based on the international house price database (from the Dallas Fed). Using those data, Kiefer compared housing trends price increases (and in a couple of places like Spain and Ireland, decreases) across 24 countries. He also looks at the change in affordability of houses, comparing housing increases with disposable income growth. (Belgium is a surprising outlier in this category, where housing cost has inreased 1.8 times faster than income.) But I thought the most interesting chart was the animation of house prices below: despite the much-publicised spike in housing prices in big cities like London and San Francisco, when you look at the country-level data it's actually Canada, Australia and New Zealand that lead the pack.

House prices

Len used R for all the analysis and visualization, and helpfully posted the R code to the end of his blog post. Kiefer imported the Excel data file from the Dallas Fed simply by using the read.xls function from the gdata package. The charts were created using the ggplot2 package, and the chart above was animated from individual frames using the animation package

(Incidentally, there's a new way to create animations using ggplot2: the gganimate package. This PlotCon presentation by David Robinson explains how to use gganimate, including the use of the tweenr package to include smooth inter-frame transitions in the style of GapMinder.)

For more details on the housing price analysis, including the R code, follow the link to Len Kiefer's blog post below.

Len Kiefer: Global house price trends (via Urban Demographics)

To leave a comment for the author, please follow the link and comment on their blog: Revolutions. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)