[R-sig-teaching] cartograms in R

Mark Daniel Ward mdw at purdue.edu
Thu Aug 20 10:55:27 CEST 2009

I posted a question about cartograms in R on the R-sig-Geo list 10 days 
ago and didn't get any responses....  but it is also relevant to 
teaching with R, so I'll post it here now.

I installed libfftw3, and also Rcartogram from Omegahat, and I am able 
to run
Duncan's example successfully:


In fact, the example runs surprisingly fast, even on the humble Mac G4 I 
have at
home.  Very cool!

So now let's reach for the stars.  I would like to be able to assign a 
for my students to make some cartograms in R.  Has anyone tried this in
practice?  I see that Duncan gave this as a bonus project in fall 2008:


My students won't be wizards with R, in fact, they will be first-semester
students in R, but they are in the Honors program (top 1 percent of Purdue
students).  I think it is an excellent opportunity to get them making some
cartograms with R.  What I would like to have are some start-to-finish 
to give to the students.  Duncan's synthetic.R example is really cool, 
but it
doesn't produce a cartogram, for instance, of the whole USA or the whole 

Maybe it sounds crazy, but I would love to have the students be able to make
some maps of the caliber seen on Worldmapper:

Is this feasible?  Crazy?  Hints?  Suggestions?  I always like to have some
nice, concrete examples to give to the students before starting (rather than
letting the students jump into water over their heads and sink).

Any advice that you have would be greatly appreciated.

More information about the R-sig-teaching mailing list