Visualising the 2018 New Zealand Census

The census data from 2018 has taken a long time to be released, but there are finally some interesting datasets available for the public to look at. I was interested in looking at the composition of our country's population from a few different angles, while at the same time practicing using ggplot, a visualisation library for R.

All data was taken from Stats NZ's NZ.Stat tool.


Age

First we will take a look at the median age of the population, and how that differs across the country. Between 2013 and 2018, the median age of the country as a whole decreased from 37.6 to 37.3. This small reduction masks significant differences across the Territorial Authority Areas. Over the five year period, the median age in most areas increased, with some significant exceptions. Notably Auckland, the largest city, saw a slight reduction in median age, while Queenston-Lakes saw a significant decrease.

Your browser does not support SVG

Looking more closely at Auckland, there is a large difference in median age across the different Local Board Areas, but only small increases or decreases over the five year period.

Your browser does not support SVG

Birthplace

This chart shows the proportion of the population of each Territorial Authority Area by their place of birth, which has been grouped into broad geographic regions. Auckland has the highest proportion of foreign-born residents, closely followed by Queenstown-Lakes. Generally, more rural districts have a higher proportion of New Zealand-born residents.

Your browser does not support SVG

Drilling down again to look at Auckland, we see that those areas on the outskirts of the city have the highest proportion of locally born residents. Other areas have a high proportion of residents who were born in a single region -- perhaps people migrating to New Zealand are more likely to live near people from their country or region of origin.

Your browser does not support SVG

Ethnicity

Taking a look at reported ethnicities across the different age profiles, we can see that, as expected, there is more diversity among the younger age groups. This chart shows the proportion of people reporting each ethnicity at each age group, so it always adds up to 100%. A full quarter of respondents in the 0-4 years category report more than one ethncitiy.

Note that Mixed is a category where I have aggregated all people reporting two or more ethnicities.

Your browser does not support SVG

We can also show this data by raw count, that is, the number of people in each age group who report each ethnicity.

Your browser does not support SVG

I also wanted to see whether there was any difference in the age profiles of each gender within each ethnicity.

Your browser does not support SVG

Religious Affiliation

It's well known that in every census, New Zealanders are less likely to declare a religious affiliation than in the previous one. However, that summary masks significant differences between regions, ethnic groups, and even gender.

Overall, the country is split roughly in half either way.

Your browser does not support SVG

Women are slightly more likely to report a religious affiliation than men.

Your browser does not support SVG

Intuitively, this could be because women live longer than men, and older people are more likely to be religious.

Your browser does not support SVG

However, we see that the proportion of women reporting a religious affiliation is increasingly higher than the proportion of men from around the 30-34 age group.

Your browser does not support SVG

It's also interesting to see how religious affiliation differs across the regions. We already know that areas outside the main centres have a higher median age, and we might expect rural areas to have stronger ties to religion. But we actually see the opposite -- most of the cities have more religious affiliation than rural distrcits.

Auckland, which is by far our largest city, has the second highest proportion of census respondents reporting a religious affiliation. The highest proportion is in the Wairoa District, which includes the Mahia Peninsula, where Rocket Lab has their launch site. Perhaps those people working on rocket launches say a few more prayers than the rest of us!

Your browser does not support SVG

We can examine the responses by age and gender for each of the geographic regions. Interestingly, young and middle aged people in Auckland appear to report significantly higher rates of religious affiliation than in other parts of the country.

Your browser does not support SVG

Looking into Auckland in more detail, we see that there is again significant divergence within the city. Little more than a quarter of respondents in some areas report a religious affiliation, whereas in other areas more than three-quarters do.

Your browser does not support SVG

In the most religious areas of Auckland, this is consistent across age groups.

Your browser does not support SVG

There are significant differences in the rate of religious affiliation between ethnicities.

Your browser does not support SVG

And significant differences between people born in different regions.

Your browser does not support SVG

I hope some of these charts are of interest. If you have any questions or comments on this post (constructive criticism welcome!), please don't hesitate to contact me.