5 Gapminder Part 1
Reading
Guided Instruction
Guided instruction materials are tailored to this course and often have extra hints/emphasis to help you complete the task. These exercises assume you have read the material. They provide you an opportunity to practice while providing additional explanation. Solutions for the exercises are provided at the bottom of the file. You can think of this like a chance to “look in the back of the book.” These activities are not graded or turned in. You can use them however you like, to your best benefit.
- Read and complete the exercises in the
.Rmd
file (you may wish to knit the file first for easier reading): ggplotting with many layers
Note that the guided instruction files and videos all use .Rmd
files instead of .qmd
. The way an .Rmd
works is very similar and you don’t need to adjust your work flow. Instead of “render” you “knit” the .Rmd
. Also, don’t be surprised - some of the YAML options, chunk options, and visual editor capabilities are different.
Hans Rosling is one of the most popular data scientists on the web. His original TED talk, The best stats you’ve ever seen set a new bar for data visualization. We are going to create some graphics using his formatted data.
- Use a
.qmd
file to recreate the graphic shown below usinggapminder
dataset fromlibrary(gapminder)
(get them to match as closely as you can).- Remove Kuwait from the data (explanation of why)
- Use
library(tidyverse)
to load ggplot2 and dplyr so that you can duplicate the plot below. (Hint: use+ theme_bw()
to get the proper formatting) - Use
scale_y_continuous(trans = "sqrt")
to get the correct scale on the y-axis.
Right click the image to open in a new tab so that you can zoom in and see the details.
Don’t forget that slack is a great place to go if you can’t figure something out. Asking questions in a way that allows people to help you is a skill you can practice in slack and within your groups.
- Render the
.qmd
file. Push all the files created in the rendering process into your GitHub repository.
Submit
In I-learn submit a link to the .md
file on GitHub.