1. Learn
  2. /
  3. Courses
  4. /
  5. Visualization Best Practices in R

Exercise

Ordered point chart

Let's start by improving the point plot we saw in the slides.

First, change the data manipulation pipeline to filter to the years 1992 and 2002 instead of the default 2006-2016. Note that the array interestingCountries has been loaded and is the same as in the slides.

Now modify the plotting code to plot the new data, but this time, let's reorder the y-axis in descending order of cases for 1992.

Instructions

100 XP
  • Modify filter() to pull the years 1992 and 2002.

  • Modify Aesthetics to:

    • Plot the cases for 1992 by country.
    • reorder() y-axis by the number of cases.