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!
This exercise is part of the course
Visualization Best Practices in R
Exercise instructions
- Print data frame by simply calling the it:
who_disease
. - Modify ggplot code so
aes()
contains the region as its x-axis mapping.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# print data frame to inspect
___
# set x aesthetic to region column
ggplot(who_disease, aes(___)) +
geom_bar()