Birth and death rates in China 1949-2011

This document shows the net change in the population by subtracting death rate from birth rate over the period 1949-2011. The political changes in China are indicated by vertical lines. In particular, note the negative effect on the size of the population during the time of the 'Great Leap Forward' in the late 1950s. The change in population appears now to be stabilising. The data is a held in a publicly-accessible dropbox folder.

Load the data. There are two datasets. One contains the time series of births and deaths, and the other the years marking changes in political regime.

china <- read.csv("http://dl.dropbox.com/u/23281950/china.csv")
eras <- read.csv("http://dl.dropbox.com/u/23281950/eras.csv")

The package ggplot2 is needed

install.packages("ggplot2")
## Installing package(s) into 'C:/Users/Stephen/Documents/R/win-library/2.15'
## (as 'lib' is unspecified)
## Error: trying to use CRAN without setting a mirror
library(ggplot2)

Create a vector of net population effects by subtracting deaths from births

bd <- china$Birth.Rate - china$Death.Rate

run the graph

p <- qplot(Year, bd, data = china, geom = "line", colour = "red", lwd = 1, xlab = "Year", 
    ylab = "Births minus Deaths", main = "Births - Deaths China 1949 - 2011")
p + geom_vline(aes(xintercept = start), data = eras) + theme(legend.position = "none")

plot of chunk unnamed-chunk-4

Next step is to colour the rectangles representing political regimes. That's giving me some headaches!