open-source campaign finance analysis with R and MySQL

June 18, 2009 | jjh

Introduction In Part 1 of this tutorial we introduced the fechell library by extracting all itemized contributions from individuals made to the Obama For America campaign in 2007 and 2008. In Part 2 of the tutorial we will summarize that data set by importing it into a MySQL database and aggregating contributions by week ...
[Read more...]

Two plot with a common legend – base graphics

June 6, 2009 | Paolo

If you need to share a common legend between two graphs using the ggplot2 package/paradigm take a look at this post from the Learning R blog.The code below solves the same task using the R base graphics.png( "2plot1legend.png", width = 480, height = 68...
[Read more...]

Use meaningful color schemes in your figures

June 3, 2009 | Stephen Turner

Some of the best figure design ideas come from cartographers. If you've ever read a Tufte book you've seen lots of examples. Let's talk about using color effectively. Penn State geography professor Cindy Brewer's ColorBrewer tool for selecting color schemes for figures has been conveniently packaged into an R library ... [Read more...]

Comparison of different circle graphs

March 24, 2009 | Cloud Wei

See in my Picasa here and get corrplot package here. Thanks Bob O'Hara's advice:)I found people's tastes differ, so input parameter col (fill color) and bg (background color) was added in new edition. What is more, now you can order your variables usin... [Read more...]

Visulization of correlation matrix

March 12, 2009 | Cloud Wei

Color Imagedata(mtcars)fit = lm(mpg ~ ., mtcars)cor = summary(fit, correlation = TRUE)$correlationcor2 = t(cor[11:1, ])colors = c("#A50F15", "#DE2D26", "#FB6A4A", "#FCAE91", "#FEE5D9","white", "#EFF3FF", "#BDD7E7", "#6BAED6", "#3182BD", "#08519C")image(1:11, 1:11, cor2, axes = FALSE, ann = F, col = colors)text(rep(1:11, 11), rep(1:11, each = 11), round(100 * cor2))Ellipseslibrary(... [Read more...]


March 11, 2009 | Cloud Wei

There are many types of scatterplots in R, here are some examples based on the famous Iris data.pairs() and coplot() in package graphics.gpairs() in package YaleToolkit.scatterplot.matrix() or spm() in package car.splom() in package lattice. [Read more...]

maps of Poland in R

June 23, 2008 | Michal

Bogdan Taranta (website in Polish) is developing a set of functions for drawing administrative maps of Poland. I wrote similar functionality for myself already some time ago, but only for voivodships, i.e. top-level administrative units, and also in a rather low resolution. Bogdan’s contribution seems to contain all ... [Read more...]
1 4 5 6

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)