Capstone exercise
Using an Rmd file, create a short analysis report of the gapminder dataset.
Feel free to collaborate!
- Pick three countries you are interested in.
- Write an Rmd script to load the gapminder data file, select all the data for those countries (hint, use the filter() function), and use ggplot to make a three scatter plots (one for each country) that has year on the x-axis and GDP on the y axis. Make sure you load all the libraries you might need (dplyr, ggplot2, etc). Describe any trends you see for each country using markdown text.
- Commit the changes to your .Rmd file using git.
- For the year 2007, calculate the mean, min, and max life expectancies for each continent. Describe what you see in the results using markdown text.
- Commit your changes using git and push them to GitHub.
- Make 2 histograms of global life expectancy using ggplot. One with the default bin widths and one with narrower bin widths. Explain the differences and any interesting trends in markdown text.
- Commit your changes and push them to GitHub.
- Compile the final .Rmd file to HTML, make sure it looks ok, and then commit this HTML file (plus figures) and push everything to GitHub.
(Thanks to Naupaka)