Add a Directory HW5

Add a directory HW5 to your repository. This is where you will put the rest of your work for this assignment.

Be sure to commit and push your changes.

1. Gapminder Tooltips

The ggplotly function in the plotly package allows you to add tooltips to points in a plot created with ggplot2. Use this approach to add tooltips showing coutnry name to the plots of life expectancy against for four years from Problem 1 on Assignment 4.

2. Arrival and Departure Delays

The nycflights13 package provides in a data frame flights data on all flights originating from one of the three main New York City airports in 2013 and heading to airports within the US. The help page for flights describes the variables in the data set.

Create a scatterplot to show the relation between the arrival delays and the departure delays observed for these flights. Since the data set is quite large a simple scatterplot will result in a lot of over-plotting. You will need to use the techniques shown in class to create a plot that shows the key features of the data.

3. Evaluate a Visualization

A blog post shows this visualization of donations for research on on several diseases and the number of deaths attributed to these diseases:

The image is originally from an article at Vox.

The data are available at

Submit Your Work

Write up your work in an Rmarkdown document called hw5.Rmd in your HW5 folder, and commit it to your local repository. You can commit the hw5.html as well but you do not need to.

Submit your work by pushing your local repository changes to your remote repository.

Make Sure Your Work Is Reproducible

One of the goals of using git, GitHub, and Rmarkdown is for you to practice creating a framework that you can hand to someone else to reproduce your analysis. This means, among other things, that

If you are working on Windows or a Mac a good test is to go to our Linux systems, check out your repository, and check that your hw5.Rmd file can be rendered successfully to produce hw5.html. You can do this using the RStudio menus or from the R command line with


Make sure your working directory is HW5 for this.

You can also run this command in a shell in your HW5 directory:

Rscript -e 'rmarkdown::render("hw5.Rmd")'

Make sure you use the right combination of single and double quotes.