File:Contribution size.png

Generated using data from Oct 1 2009 - May 31 2010. Unofficial personal work, has not been peer reviewed.

"R":

file = "rawamount.txt.csv" d=scan(file=file, skip=0, sep=",")

breaks = c(0, 30, 50, 100, 200, 1000, 1000000) h=hist(d,   breaks=breaks,    plot=FALSE ) cs=cut(d,   breaks=breaks,    include.lowest=TRUE,    dig.lab = 10 ) avgs=tapply(d, cs, mean) ranges = c("less than $30", "$30 to $50", "$50 to $100", "$100 to $200", "$200 to $1,000", "$1000 and up")

postscript(file="contribution_size.ps") pie(   h$counts * avgs,    lab = ranges,    #lab = paste(levels(cs), "\n", signif(avgs, 2)),    main = "Relative contributions to total, by donation size",    col = heat.colors(length(avgs)) ) dev.off