A population study in Shiny application
25 Jan 2015
Like many other developed countries, Singapore is struggling with low birth rate - usually measured in terms of Total Fertility Rate (TFR).
Some usual factors associated with low TFR:
In this assignment, we evaluate relationship of Education Achievement and its low TFR, and the effective way delivering this information.
The dataset is taken from Singapore Government Database (http://www.data.gov.sg/):
Shiny is used to present the timeseries data:
The data shows that the trend overtime is higher passing rate and lower fertility rate.
The trend is even true when there were small reversal 2006/07 and 2010/11.
The trend is best seen as time series; however, usual timeseries plot is not able to represent all information at once clearly. The following code plots the series on next page.
qplot(eth5olvl, ethtfr, data=subset(sgedutfr, year==1997), color=ethnic, size=ethnatincr)
qplot(eth5olvl, ethtfr, data=sgedutfr, color=ethnic, shape=as.factor(year), size=ethnatincr)
Single year plot: clear info, no trend.
Time series plot: too much info, unobservable trend.
The full timeseries is plotted as web application using Shiny instead: https://yrabin.shinyapps.io/dataprod/
Shiny interactivity allows the user to observe the info year by year clearly. The slider and “Play” button gives users instant information on the trend.
Based on the observed trend, the following are conclusions: