1. Clean Up Your Repository

Make sure your repository includes only the files needed, in the right place, and with the right names. Your repository structure at this point should look like this:


If you need to move or rename files you can use git mv in a shell to do this. By doing this though git you make sure that your change history is not lost.

It is OK to also have a project file or a .gitignore file.

Be sure to commit your changes and push them to GitHub.

2. Add a Directory HW2

Add a directory HW2 to your repository. This is where you will put the rest of your work for this assignment in an Rmarkdown file named hw2.Rmd.

Be sure to commit and push your changes.

3. Find a Better Visualization

This visualization was posted on a USA Today website several years ago:

Explain why this is misleading. Create one or two alternative visualizations, and explain why they are more appropriate. Data read from the graph are available as a CSV file

4. Average Life Expectancies

The gapminder package contains a selection of data from the Gapminder web site. Select the subset of values for years since 1990, compute the average life expectancy for each continent, averaging over countries and years, and show these values in a dot plot and a bar chart.

Is one of these two visualizations more appropriate than the other? Explain your reasoning. Would your answer change if you excluded Africa and Oceania?

Submit Your Work

Write up your work in an Rmarkdown document called hw2.Rmd in your HW2 folder, create the file hw2.html from your Rmarkdown document, review it, and commit your hw2.Rmd to your local repository. You can commit the hw2.html as well but you do not need to.

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