Exercise

Exercise 9. Dollars per day - part 3 - multiple density plots

Now we are going to combine the plotting tools we have used in the past two exercises to create density plots for multiple years.

Instructions

100 XP
  • Create the dollars_per_day variable as in Exercise 7, but for African countries in the years 1970 and 2010 this time.
    • Make sure you remove any NA values.
  • Create a smooth density plot of dollars per day for 1970 and 2010 using a log (base 2) scale for the x axis.
  • Use facet_grid to show a different density plot for 1970 and 2010.