The purpose of this study is to explore the continental evolution of, and relationship between, economic stability and life expectancy over time. Specifically, this study will examine 1) patterns of change in GDP per capita, 2) patterns of change in life expectancy, and 3) the relationship between average GDPs per capita and average life expectancy from 1952 to 2007 within the continents of Africa, Americas, Asia, Europe, and Oceania. The following research questions aim to address the study’s purpose.
How does average GDP per capita change over years (i.e., 1952 to 2007) across continents (i.e., Africa, Americas, Asia, Europe and Oceania)?
How does average life expectancy change over years (i.e., 1952 to 2007) across continents (i.e., Africa, Americas, Asia, Europe and Oceania)?
How does the relationship between average GDPs per capita and average life expectancy change over years (i.e., 1952 to 2007) across continents (i.e., Africa, Americas, Asia, Europe and Oceania)?
Average GDP per Capita (n = 60) is a continuous variable. The data range from 0 to 30000 and increase in increments of 2500. The Average GDP per Capita was created by aggregating each countries GDP per Capita (n = 1704) to the respective continent.
Average life expectancy (n = 60) is a continuous variable. The data range from 40 to 80 and increase in increments of 5. The average life expectancy was created by aggregating each countries life expectancy (n = 1704) to the respective continent.
Year is an interval variable. The data range from 1952 to 2007 and increase in increments of 5. Frequency counts conducted on Year revealed n = 5 in each Year in the dataset.
Continent is a nominal variable. The data are displayed in the following five categories: Africa, Americas, Asia, Europe, Oceania. Frequency counts conducted on Continent revealed n = 12 in each of the five categories.
library(ggplot2)
library(tidyverse)
library(gapminder)
library(scales)
library(RColorBrewer)
library(psych)
GDPLifeExp <- gapminder %>%
group_by(continent, year) %>%
summarise(lifeExp = mean(lifeExp), gdpPercap = mean(gdpPercap))
describe(GDPLifeExp)
## vars n mean sd median trimmed mad min max
## continent* 1 60 3.00 1.43 3.00 3.00 1.48 1.00 5.00
## year 2 60 1979.50 17.41 1979.50 1979.50 22.24 1952.00 2007.00
## lifeExp 3 60 63.96 10.79 67.36 64.69 10.40 39.14 80.72
## gdpPercap 4 60 10064.62 7035.13 8116.20 9262.36 6464.28 1252.57 29810.19
## range skew kurtosis se
## continent* 4.00 0.00 -1.36 0.18
## year 55.00 0.00 -1.28 2.25
## lifeExp 41.58 -0.52 -0.88 1.39
## gdpPercap 28557.62 0.88 0.00 908.23
counts <- table(GDPLifeExp$continent)
print(counts)
##
## Africa Americas Asia Europe Oceania
## 12 12 12 12 12
counts2 <- table(GDPLifeExp$year)
print(counts2)
##
## 1952 1957 1962 1967 1972 1977 1982 1987 1992 1997 2002 2007
## 5 5 5 5 5 5 5 5 5 5 5 5
GDPYear <- gapminder %>%
group_by(continent, year) %>%
summarise(gdpPercap=mean(gdpPercap))
ggplot(GDPYear, aes(x=year, y=gdpPercap, color=continent)) +
geom_point(size=1.5) +
geom_smooth(aes(fill=continent), method="lm") +
labs(x = "Year", y = "GDP per Capita", fill = "Continent", colour = "Continent") +
scale_colour_brewer(palette = "Set1") +
scale_fill_brewer(palette = "Set1") +
scale_x_continuous(breaks=seq(1952,2007,5)) +
scale_y_continuous(breaks = seq(0,30000,2500)) +
theme_bw() +
theme(axis.title = element_text(size = 14), legend.title = element_text(size = 14))
Plot 1 displays the relationships between average GDP per Capita (y-axis) grouped by continent (fill colour) over years beginning in 1952 and ending in 2007, in increments of 5 years (x-axis). As shown, each continent’s average GDP per Capita appears to be increasing over the years, however the trends between continents appeared to increase at varying rates within this range of time. The continent with the lowest average GDP per Capita and the smallest rate of change was Africa. While the continents of the Americas, Asia and Europe all had similar average GDP per Capita in 1952, differences emerged over the years. The Americas and Asia had slower and more comparable rates of average GDP change per Capita over years compared to Europe, which appeared to have an increased rate of change. The continent with the highest average GDP per Capita was Oceania, and the rate of change appeared to be similar to that of Europe over the years.
ExpYear <- gapminder %>%
group_by(continent, year) %>%
summarise(lifeExp=mean(lifeExp))
ggplot(ExpYear, aes(x=year, y=lifeExp, color=continent)) +
geom_point(size=1.5) +
geom_smooth(aes(fill=continent), method="lm") +
labs(x = "Year", y = "Life Expectancy", fill = "Continent", colour = "Continent") +
scale_colour_brewer(palette = "Set1") +
scale_fill_brewer(palette = "Set1") +
scale_x_continuous(breaks=seq(1952,2007,5)) +
scale_y_continuous(breaks = seq(40,80,5)) +
theme_bw() +
theme(axis.title = element_text(size = 14), legend.title = element_text(size = 14))
Plot 2 displays the relationships between average life expectancy (y-axis) grouped by continent (fill colour) over years beginning in 1952 and ending in 2007, in increments of 5 years (x-axis). As shown, each continent’s average life expectancy appears to be increasing over the years and the rate of change between continents appeared to increase at a relatively similar rate within this range of time. The continent with the lowest average life expectancy across the years was Africa, and the continent with the highest across the years was Oceania. The continents of the Americas and Asia appear to be trending towards an interaction.
label_year <- GDPLifeExp %>%
filter(year == max(year) | year == min(year))
ggplot(GDPLifeExp, aes(x = lifeExp, y = gdpPercap, colour = continent)) +
geom_point(size = 2, alpha = 0.6) +
geom_text(data = label_year, aes(label = year),show.legend = FALSE, nudge_x = -2, fontface="bold") +
labs(x = "Life Expectancy", y = "GDP per Capita", fill = "Continent", colour = "Continent") +
scale_colour_brewer(palette = "Set1") +
scale_fill_brewer(palette = "Set1") +
scale_x_continuous(breaks = seq(40,80,5)) +
scale_y_continuous(breaks = seq(0,30000,2500)) +
theme_bw() +
theme(axis.title = element_text(size = 14), legend.title = element_text(size = 14))
Plot 3 displays the relationships between average GDP per Capita (y-axis) and average life expectancy (x-axis) grouped by continent (fill colour) and also displays the start (1952) and end point (2007) of years for each continent (labeled). As shown, each continent displays a positive relationship between average GDP per Capita and life expectancy from 1952 to 2007, suggesting that as average GDP per Capita increases, average life expectancy also increases. The relationship between average life expectancy and average GDP per Capita in Africa showed the lowest rate of change, with minimal increases in both average GDP per Capita and average life expectancy from 1952 to 2007. The Americas and Asia displayed similar relationships between average GDP per Capita and average life expectancy, whereby increases in average life expectancy and GDP per Capita appeared to occur at a relatively steady rate from 1952 to 2007 with no overly distinct patterns of change. Europe and Oceania exhibited similar relationships between average GDP per Capita and average life expectancy, with prominent increases in average life expectancy and average GDP per Capita occurring from 1952 to 2007.