Exploring Christchurch property sales data
Christchurch City Council has published an amazing dataset of property transactions in Christchurch. The data has more than 50 variables for every sale back to around 2009. This includes actual selling prices as well as some characteristics of the properties. Most of the sales have been geocoded to latitude and longitude coordinates, making spatial analysis relatively easy.
The data is available via an API. I kind of wish they would also publish a full, clean CSV file, updated monthly. I also wish there was better documentation. But these are just minor gripes. It is a huge step forward for this kind of data to be available to the public. I hope other councils, especially Auckland, will do the same soon.
Here’s a graph of all the gross selling prices between 2009 and 2016 — one dot for each sale. I’ve capped the vertical scale at $3m. You can clearly see the effects of the earthquake in February 2011. You can also see a high volume of sales at the end of 2011 and early 2012, many of which I understand were sales of uninhabitable properties back to the Crown.

Here’s a similar graph with a log scale so all the sales can be shown. There are some very high selling prices in the data, presumably for commercial properties. It also looks like where multiple properties were sold together, each property in the bundle is recorded as a separate sale, with the total selling price repeated multiple times. There are quite a few sales for $1 and $0. I’m not sure if the $0 sales are true sales or just some kind of adjustments to property records. These are questions that better documentation could help to answer.

I also made some maps of the sales in each year. One slightly tricky thing with mapping this data is that the proportion of sales that have geographic coordinates varies over time between about 80% and 90%. So if you just map the geocoded sales, some of the change in the number of those sales over time is just due to the rate of geocoding, not changes in the actual number of sales. For the sake of visualisation, I compensated for this in the easiest way possible — by randomly discarding some sales in years where the proportion of geocoded sales was higher than the minimum (79% in 2014), to make the proportion of geocoded sales the same in every year.
I didn’t attempt to do anything about the issue of bundled sales described above.
Here’s the maps:

Here’s the code I used to make these graphs and maps. And here’s the code I used to download data from the Christchurch property API, which might help if you’re trying to figure out how to use it. The topographic data in the maps is from LINZ.
