The questions for this project are:

Page 1

  1. Summarize and plot the median life expectancy (MLE) in 1952 for each of the 5 countries with the top MLE’s and for each of the 5 countries with the bottom MLE’s. You should have one summary table and one plot. Hint: Use the data in 1952 to find the top 5 countries and bottom 5 countries in MLE. Then, plot the MLE for each of the 10 countries. You should have 10 bars in one graph.

Row

Summary

# A tibble: 10 x 2
   country      lifeExp
   <fct>          <dbl>
 1 Norway          72.7
 2 Iceland         72.5
 3 Netherlands     72.1
 4 Sweden          71.9
 5 Denmark         70.8
 6 Afghanistan     28.8
 7 Gambia          30  
 8 Angola          30.0
 9 Sierra Leone    30.3
10 Mozambique      31.3

Row

Chart 1

Findings

Norway, Iceland, Netherlands, Sweden and Denmark are the top five countries with the top MLE’s in 1952 whereas Afghanistan, Gambia, Angola, Sierra Leone and Mozambique are the top five countries with the bottom MLE’s in 1952. Norway has the highest MLE and Afghanistan has the lowest MLE in 1952.

Page 2

  1. Summarize and plot the median life expectancy (MLE) in 2007 for each of the 5 countries with the top MLE’s and for each of the 5 countries with the bottom MLE’s. You should have one summary table and one plot for the 10 countries.

Row

Summary

# A tibble: 10 x 2
   country          lifeExp
   <fct>              <dbl>
 1 Japan               82.6
 2 Hong Kong, China    82.2
 3 Iceland             81.8
 4 Switzerland         81.7
 5 Australia           81.2
 6 Swaziland           39.6
 7 Mozambique          42.1
 8 Zambia              42.4
 9 Sierra Leone        42.6
10 Lesotho             42.6

Row

Chart 2

Findings

Japan, Hong Kong(China), Iceland, Switzerland and Australia are the top five countries with the top MLE’s in 2007 whereas Swaziland, Mozambique, Zambia,Sierra Leone and Lesotho are the top five countries with the bottom MLE’s in 2007. Japan has the highest MLE and Swaziland has the lowest MLE in 2007.

Page 3

  1. Summarize and plot the median life expectancy in each year for the largest 5 countries in terms of 2007 population. You should have one summary table and one plot. Hint: Use the data in 2007 to find the top 5 countries in population. Then, plot MLE vs year for each of the 5 countries. You should have 5 curves and you should overlay them in one graph.

Row

Summary

# A tibble: 5 x 2
  country              pop
  <fct>              <int>
1 China         1318683096
2 India         1110396331
3 United States  301139947
4 Indonesia      223547000
5 Brazil         190010647

Row

Chart 3

Findings

China, India, United States, Indonesia and Brazil are the top five countries in terms of 2007 population. United States has the highest MLE in terms of 2007 population.

Page 4

  1. Summarize and plot the median life expectancy in each year for each continent. You should have one summary table and one plot. Hint: Find the mean of MLE for each group determined by Year and Continent.

Row

Summary

# A tibble: 60 x 3
   continent  year meanMLE
   <fct>     <int>   <dbl>
 1 Africa     1952    39.1
 2 Africa     1957    41.3
 3 Africa     1962    43.3
 4 Africa     1967    45.3
 5 Africa     1972    47.5
 6 Africa     1977    49.6
 7 Africa     1982    51.6
 8 Africa     1987    53.3
 9 Africa     1992    53.6
10 Africa     1997    53.6
# … with 50 more rows

Row

Chart 4

Findings

We can see that the average MLE for Oceania continent has been the greatest over years whereas Africa is the continent that has the lowest average MLE over years. However, there is an increase in average MLE for every continents in the given years.