# Location and libraries require(reshape) require(ggplot2) setwd('~/Dropbox/quantumforest') # Reading data and melting into long shape bub = read.csv('bubble-data.csv', header = TRUE) bub2 = melt(bub, id = 'year') names(bub2)[2] <- 'worry' levels(bub2$worry)[3] <- 'Something else' # Pie charts; no, really, pie charts! crazyPalette = scale_fill_manual(values = c('#7DADDD', '#EF1C22', '#BEC7D6')) crazy = ggplot(bub2, aes(x = factor(1), y = value, fill = worry)) crazy = crazy + geom_bar(width = 1) + coord_polar(theta = 'y') + facet_wrap(~ year) + crazyPalette + scale_x_discrete('Worry per year (%)') + scale_y_continuous('') crazy