Hans Rosling is one of the most popular data scientists on the web. His original TED talk was very popular among my friends when it came out. We are going to create some graphics using his formatted data as our weekly case study. Note that we need to remove Kuwait from the data (discussion on this)
This reading will help you complete the tasks below.
gapminder
dataset from library(gapminder)
(get them to match as closely as you can)
library(tidyverse)
to load ggplot2 and dplyr and the theme_bw()
to duplicate the first plotscale_y_continuous(trans = "sqrt")
to get the correct scale on the y-axis.weighted.mean()
and GDP with summarise()
and group_by()
that will be the black continent average line on the second plottheme_bw()
to duplicate the second plot. You will need to use the new data to make the black lines and dots showing the continent average.ggsave()
and save each plot as a .png
with a width of 15 inches.Rmd
, .md
, and the two .png
’s of the plots into your git repository.