Aan de slagGa gratis aan de slag

Familiarizing with disease data

The dataset containing disease cases from the World Health Organization (WHO) is loaded into your environment as the data frame who_disease.

In order to familiarize yourself with the data, let's start by printing it to the console.

Once you've investigated it a bit, make a simple bar chart of the number of observations by region using the supplied code. You will need to fill in the aes()thetics function to map the x-axis to the proper column name.

This course touches on a lot of concepts you may have forgotten, so if you ever need a quick refresher, download the Tidyverse Cheat Sheet and keep it handy!

Deze oefening maakt deel uit van de cursus

Visualization Best Practices in R

Cursus bekijken

Oefeninstructies

  • Print data frame by simply calling the it: who_disease.
  • Modify ggplot code so aes() contains the region as its x-axis mapping.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# print data frame to inspect
___

# set x aesthetic to region column
ggplot(who_disease, aes(___)) +
  geom_bar()
Code bewerken en uitvoeren