Created
July 25, 2016 16:34
-
-
Save sjstebbins/05737a304f83912f0bb3ec15acb99845 to your computer and use it in GitHub Desktop.
college costs plot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#select data from main data frame | |
increasing_college_costs <- select(data,Date,Total.cost.of.attendance..on.campus.) | |
#melt to single column | |
increasing_college_costs <- melt(increasing_college_costs,id = 'Date', value.name='Amount.in.Thousands') | |
#plot | |
ggplot(increasing_college_costs, aes(x=Date,y=Amount.in.Thousands,group=variable,color=variable)) + geom_line() + ggtitle('Average College Costs') + theme_fivethirtyeight() + theme(legend.title=element_blank()) + theme(axis.title = element_text(), axis.title.x = element_blank()) + ylab('Dollars')+theme(legend.position="none") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment