Skip to content

Instantly share code, notes, and snippets.

@levithatcher
Last active December 21, 2016 00:01
Show Gist options
  • Save levithatcher/130ee5d6586839ceeb3975e0afee9b65 to your computer and use it in GitHub Desktop.
Save levithatcher/130ee5d6586839ceeb3975e0afee9b65 to your computer and use it in GitHub Desktop.
library(ggplot2)
library(ggthemes)
library(scales)
# Grab data from here: https://data.stackexchange.com/stackoverflow/query/596780/language-trends-questions-per-tag-per-month
# setwd() <-- You may need this
df <- read.csv('LanguageComparisonOverTime.csv')
str(df)
head(df)
# Change column name and then column type
df$Language <- df$TagName
df$Month <- as.Date(df$Month)
ggplot(data = df,
aes(x = Month,
y = Questions,
group = Language,
colour = Language
)
) + geom_line() + xlab("Year") + ylab("Stack Overflow questions per month") + theme_economist()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment