In April, Hans Rosling examined the influence of religion on fertility. I used R to replicate a graphic of his talk:
> library(datamart) > gm <- gapminder() > #queries(gm) > # > # babies per woman > tmp <- query(gm, "TotalFertilityRate") > babies <- as.vector(tmp["2008"]) > names(babies) <- names(tmp) > babies <- babies[!is.na(babies)] > countries <- names(babies) > # > # income per capita, PPP adjusted > tmp <- query(gm, "IncomePerCapita") > income <- as.vector(tmp["2008"]) > names(income) <- names(tmp) > income <- income[!is.na(income)] > countries <- intersect(countries, names(income)) > # > # religion > tmp <- query(gm, "MainReligion") > religion <- tmp[,"Group"] > names(religion) <- tmp[,"Entity"] > religion[religion==""] <- "unknown" > colcodes <- c( + Christian="blue", + "Eastern religions"="red", + Muslim="green", "unknown"="grey" + ) > countries <- intersect(countries, names(religion)) > # > # plot > par(mar=c(4,4,0,0)+0.1) > plot( + x=income[countries], + y=babies[countries], + col=colcodes[religion[countries]], + log="x", + xlab="Income per Person, PPP-adjusted", + ylab="Babies per Woman" + ) > legend( + "topright", + legend=names(colcodes), + fill=colcodes, + border=colcodes + )
One of the points Rosling wanted to make is: Religion has no or very little influence on fertility, but economic welfare has. I wonder if demographs agree and take this economic effect into account.
If you want to know more about that
gapminder function and that
query method, read on.