# the last line is projected based on citations to the end of october # (almost certainly conservative) library(ggplot2) d <- read.csv("wikipedia_citations.txt",header=F) colnames(d) <- c("year", "citations") # print the total number of citations sum(d$citations) # generate and print a graph # p <- qplot(year, citations, data=d) + # geom_line(colour="blue") + geom_point(colour="blue") p <- qplot(factor(year), citations, data=d, geom="bar", fill=I("darkblue")) p <- p + scale_x_discrete("Year") + scale_y_continuous("Number of Papers") pdf("citations_by_year.pdf", width=7.5, height=5.3) print(p) dev.off() ## data from dario ##########################################################3 # import data from dario d <- read.csv("Wikipedia publications - Data.csv") # clean up the dates colnames(d)[1] <- "date" d <- d[,c(-9,-10)] d <- d[!d$date == "2013 to date",] d$date <- as.factor(d$date) library(reshape) qplot(date, value, data=melt(d), group=variable, geom="line") + aes(colour=variable) + scale_y_log10()