Question: Section 1 exercises: 1 . ( 5 pts . ) Run ggplot ( data = gapminder 0 7 ) . What do you see and

Section 1 exercises:
1.(5 pts.) Run ggplot(data = gapminder07). What do you see and why?
2.(5 pts.) How many rows are in gapminder07? How many columns?
Aesthetic mappings
The plot above shows that people in rich countries, on average, live longer than people in poor countries. However,
it tells us very little about which countries belong to different categories. For example, where are the different
continents on this graph? We saw in the data frame that it contains information about continents. How do we
bring this information into the graph?
In ggplot2, you do this by adding an additional variable, like continent, to the two dimensional scatterplot by
mapping it to an aesthetic. An aesthetic is a visual property of the objects in your plot. Aesthetics include things
like the size, the shape, or the color of your points. You can display a point (like the one below) in different ways
by changing the values of its aesthetic properties.
Figure 1:
Since we already use the word value to describe data, lets use the word level to describe aesthetic properties.
You can convey information about your data by mapping the aesthetics in your plot to the variables in your dataset.
For example, you can map the colors of your points to the continent variable to reveal the continent of each
country.
ggplot(data =)+
(mapping = aes())

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!