Analysing the Modelled Territorial Authority GDP estimates for New Zealand

13 Sep 2016

At a glance:

My presentation and paper on the development and use of "Modelled Territorial Authority Gross Domestic Product" for New Zealand, as presented to the New Zealand Association of Economists conference in June 2016

At the conference of the New Zealand Association of Economists (NZAE) in late June 2016 I gave a paper on Modelled Territorial Authority Gross Domestic Product, a new dataset my team developed last year in my day job. See the official website of the MTAGDP project for definitive information. I briefly blogged about the data when it was first released in October 2015; since then it has been updated and enhanced.

The papers from the conference were originally planned to be published on the NZAE website but this doesn’t seem to have happened so I’ve put mine up in the “presentations” part of my blog instead.

  • Full paper (PDF) - the only manifestation that’s really aimed at being reader-friendly
  • Presentation - visual props, doesn’t tell the story by itself but looks nice
  • Source code - source code for my contribution at the conference, including the analysis in R, paper in LaTeX and the Rmarkdown / reveal.js code of the presentation. Not the source code for creating Modelled Territorial Authority GDP estimates, which is published elsewhere (links in the paper)

Some visual highlights

The paper talks about how we developed these estimates and has some example analysis demonstrating possible use case. For example, I fit a generalized additive model to economic growth from 2005 to 2015 to see if it could be explained in part by the absolute level of GDP or the importance of agriculture at the beginning of the period, while correcting for spatial auto-correlation (spoiler - found no evidence of a link).

Without wanting to paraphrase the whole paper again in this blog, here are some visual highlights. Explanations are in the full paper.


Which districts and cities have similar industry profiles?

a


b


How do agriculture and GDP in 2005 relate to subsequent growth? (not much)

c


How does construction in Taranaki get allocated to sub-industries and districts?

d


How does the data look in its web app built with Shiny? (Note the machine-generated interpretation / commentary on the right side of the screen)

e


Which districts and cities had the highest growth rates 2005 to 2015?

e


What’s the GDP growth map of New Zealand look like?

e


What about if we smooth the growth patterns and draw it like a funky weather map instead?

e


Accessing the data

The full source code for the conference paper and its analysis is available on GitHub, but here’s a much shorter snippet of R code to download the data in two tables from the definitive location on the MBIE website:

  • TAGDP_public contains industry breakdowns to 2013 (about 11MB)
  • mtagdp_totals is aggregate GDP (no industry breakdown) to 2015 (<1MB)
    TAGDP_public <- read.csv("http://www.mbie.govt.nz/info-services/sectors-industries/regions-cities/research/modelled-territorial-authority-gross-domestic-product/resolveuid/98debb063cb14ecbab0f018b7681e7f4",
                   stringsAsFactors = FALSE)
    mtagdp_totals <- read.csv("http://www.mbie.govt.nz/info-services/sectors-industries/regions-cities/research/modelled-territorial-authority-gross-domestic-product/resolveuid/b811fea8196c4d269c1d5ca973933c7c",
                              stringsAsFactors = FALSE)

Comments, questions and suggestions welcomed. If they’re about my example analysis or basic “how do I use the data” I’ll answer them here; if they get controversial or about the development method I’ll swap hats and refer them back to work.

Caveat and disclaimer from the MBIE website

“These estimates are at a more detailed level of granularity than available in the Statistics New Zealand official Tier 1 regional GDP series.

“They are experimental in nature and should be used with caution. The data are modelled and produced by the Ministry of Business Innovation and Employment (MBIE) (not by Statistics New Zealand), according to the methods outlined in …

“These estimates are not a Tier 1 statistic and have been created by MBIE for research purposes. While various Statistics New Zealand collections form the source data, Statistics New Zealand will not be held accountable for any error, inaccurate findings or interpretation within the publication.

“One of the sources used for the modelling is a customised dataset created in a way that protects confidentiality, provided by Statistics New Zealand. Access to that data was provided to MBIE by Statistics New Zealand under conditions designed to give effect to the security and confidentiality provisions of the Statistics Act 1975.

“While all care and diligence has been used in processing, analysing, and extracting data and information for this publication, MBIE gives not warranty it is error free and will not be liable for any loss or damage suffered by the use directly, or indirectly, of the information.”