CommencerCommencer gratuitement

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!

Cet exercice fait partie du cours

Visualization Best Practices in R

Afficher le cours

Instructions

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

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# print data frame to inspect
___

# set x aesthetic to region column
ggplot(who_disease, aes(___)) +
  geom_bar()
Modifier et exécuter le code