library(ggplot2)
library(scales)
library(googleVis)
data_path <- 'data/'
df <- read.csv(paste0(data_path,'clean.csv'), header = T)

What has been the change in population over the years?

ggplot(df, aes(x = year, colour = country)) + geom_line(aes(y = df$population)) + theme_bw() + guides(colour = guide_legend(title = NULL)) + labs(y = 'Population in millions') + scale_colour_manual(values = c('#FF3333','#3399FF')) + scale_y_continuous(labels = comma)
Population

Population

What has been the national income?

ggplot(df, aes(x = year, colour = country)) + geom_line(aes(y = df$natIncome2010bill)) + theme_bw() + guides(colour = guide_legend(title = NULL)) + labs(y = 'Income in billions USD') + scale_colour_manual(values = c('#FF3333','#3399FF'))
National income over time

National income over time

What has been the private wealth?

ggplot(df, aes(x = year, colour = country)) + geom_line(aes(y = df$privWealth2010bill)) + theme_bw() + guides(colour = guide_legend(title = NULL)) + labs(y = 'Wealth in billions USD') + scale_colour_manual(values = c('#FF3333','#3399FF'))
## Warning: Removed 3 rows containing missing values (geom_path).
Private Wealth

Private Wealth

What has been the income per capita?

ggplot(df, aes(x = year, colour = country)) + geom_line(aes(y = df$perCapitaNatIncome2010)) + theme_bw() + guides(colour = guide_legend(title = NULL)) + labs(y = 'Income in USD') + scale_colour_manual(values = c('#FF3333','#3399FF'))
Income per capita

Income per capita

What has been the private wealth per capita?

ggplot(df, aes(x = year, colour = country)) + geom_line(aes(y = df$perCapitaPrivWealth2010)) + theme_bw() + guides(colour = guide_legend(title = NULL)) + labs(y = 'Private Wealth in USD') + scale_colour_manual(values = c('#FF3333','#3399FF'))
Wealth per capita

Wealth per capita

What has been the evolution of employment in the US and UK?

ggplot(df, aes(x = year, colour = country)) + geom_line(aes(y = df$employedPopulation)) + theme_bw() + guides(colour = guide_legend(title = NULL)) + labs(y = 'Employed Population in millions') + scale_colour_manual(values = c('#FF3333','#3399FF'))
Employment over time

Employment over time

M <- gvisMotionChart(df, idvar="population", timevar="year")
plot(M)