# put the code for your plot here
ggplot(data = CPS85, aes(x = age, y = wage)) + geom_point() + aes(colour = union) + stat_smooth(method = loess) + theme(legend.position = "right") + labs(title = "")`geom_smooth()` using formula = 'y ~ x'
In groups of three, your task is to generate a multivariate visualization of the CPS85 dataset that tells a story. We are looking for three or four variables being displayed in a scatterplot. The Current Population Survey is conducted by the US Census Bureau and the US Bureau of Labor Statistics.
The person whose birthday comes up next will be the leader. The person whose birthday comes up next after that will be the scribe. The third person will be the expert on the CPS85 data.
The data are available within the mosaicData package.
library(mosaic) and library(tidyverse).?CPS85 and glimpse(CPS85) to get a sense for what this dataset contains.mplot(CPS85) command.ggplot2 as your graphics system.Show Expression the code to generate that figure is displayed in the console.Publish your results to RPubs (see board for login information).# put the code for your plot here
ggplot(data = CPS85, aes(x = age, y = wage)) + geom_point() + aes(colour = union) + stat_smooth(method = loess) + theme(legend.position = "right") + labs(title = "")`geom_smooth()` using formula = 'y ~ x'
The nonunion members tend to make less money on average in their lifetime than union members. As they get into their late 60s, we see a switch in this.