Question: According to the author, 'ggplot is an implementation of the grammar of graphics' which is a set of rules for producing visualizations of data. In
According to the author, 'ggplot is an implementation of the grammar of graphics' which is a set of rules for producing visualizations of data. In this first plot, we will track the trajectory of life expectancy over time for each country in the data.
map year to x and lifeExp to y
use geomline to show how lifeExp changes over time. did you notice a mistaken assignment to the y parameter in the book?
use grouping to make each line refer to a specific country in the dataset
facet the data on continent
try moving the facets around on the page across and down
add a smoother, change the y scale to a log scale and add the dollar sign
add the labels as described in the book
try using facetgrid
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
