BugBunny
The assignment was to code and deploy an interactive web app using the R package shiny.
'Demography is destiny' according to Auguste Comte, or maybe Wattenberg and Scammon (1970).
This app computes population projections for the United Kingdom for 2015-50 using forecasts of total fertility chosen by the user. It can produce a population pyramid for the mid- or end-point of any decade within this period that the user selects.
Thereby, it enables the user to visualize how changes in the birth rate might affect the future size and age structure of the British population.
library(plotrix); par(mar = pyramid.plot(Men, Women, gap = 250,
lxcol = "steelblue", rxcol = "plum", unit = "000s", labels = agelab,
main = "United Kingdom", top.labels = c("Men", "2015", "Women")))
The app demonstrates several features of shiny:
The app is hosted on RStudio's shiny apps server:
https://bugbunny.shinyapps.io/ProjectionsProject
The R scripts containing the code are on GitHub:
https://github.com/BugBunny/ProjectionsProject
Projections App. Copyright (C) 2015 - Ian Timaeus
This program comes with ABSOLUTELY NO WARRANTY; this is free software, and you are welcome to redistribute it under certain conditions; see http://www.gnu.org/licenses/gpl.html