Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
New Zealand is culturally diverse. Even at a regional level, there are big differences in ethnic composition… and with an increasingly inter-connected world, ethnic composition is expected to change substantially in the future, particularly in Auckland.
Statistics New Zealand has provided us with sub-national ethnic population projections, by age and sex, from 2013 to 2038 which are well suited to visualisation using stacked area charts. The package ggplot2 in R makes generating these easy.
The following projections assume ‘medium fertility, medium paternity, medium mortality, medium net migration, and medium net inter-ethnic mobility.’ This is considered ‘medium growth’*.
Total New Zealand
Total North Island
Total South Island
Auckland
*Please see http://nzdotstat.stats.govt.nz for more information.
References:
Data:
Subnational ethnic population projections, by age and sex, 2013(base)-2038. Statistics New Zealand. Provided under the creative commons attribution 3.0 New Zealand license.
I have transformed the data into proportions.
Plotting:
http://stackoverflow.com/questions/5030389/getting-a-stacked-area-plot-in-r
http://www.cookbook-r.com/Graphs/Axes_%28ggplot2%29/
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.