Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gtuckerkellogg/3461958 to your computer and use it in GitHub Desktop.
Save gtuckerkellogg/3461958 to your computer and use it in GitHub Desktop.
Generate bar plot of databases in NAR annual issue
dblink <- "https://docs.google.com/spreadsheet/pub?key=0Amd94LRhVxVWdElNYVdHblVLRjZKR1lwaFFFZHVyWUE&single=true&gid=0&output=csv"
require(RCurl)
myCsv <- getURL(dblink)
dbs <- read.csv(textConnection(myCsv))
library(ggplot2)
names(dbs) <- c("Year","Databases")
dbs[[1]] <- as.factor(dbs[[1]])
p <- qplot(x=Year,y=Databases,data=dbs,geom="bar",fill="gray")
p + theme_bw() + opts(axis.text.x = theme_text(angle=90, hjust=1.2, size=16),
axis.title.x=theme_text(size=16),
axis.title.y=theme_text(size=16,angle=90),
axis.text.y = theme_text(size=16),
legend.position="none") +
ylab("Databases in NAR Database issue")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment