Last active
July 25, 2016 18:06
-
-
Save sjstebbins/e35e6dd73de69d923ab819f1b579c32e to your computer and use it in GitHub Desktop.
student loans default rates 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
#load data | |
default_rate_data <- read.csv("https://raw.githubusercontent.com/sjstebbins/ExploratoryDataViz/master/data/default.csv", stringsAsFactors = FALSE) | |
#melt to single column | |
default_rate_data <- melt(default_rate_data, id = 'Date',measure.vars = names(select(default_rate_data,-Date))) | |
#plot | |
ggplot(default_rate_data, aes(x=Date,y=value, group=variable, color=variable)) + geom_line() + ggtitle('Student Loan Default Rates') + theme_fivethirtyeight() + theme(legend.title=element_blank()) + theme(axis.title = element_text(), axis.title.x = element_blank()) + ylab('Percent') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment