Even though several examples of great circle visualizations exist by now, I had not seen the code of one made with ggplot2. Both solutions offered, here using plot and here using lattice, basically loop through the great circle lines ordered from low to high number of flights and overplot the lines with fewer counts, which are plotted in a light color with those with higher counts, which are plotted in a dark color.
In ggplot we can simply use the alpha parameter for transparency in combination with scale_colour_gradient to obtain a similar effect.
Example data are all flights out of Beijing, China, downloaded from openflights.org.
Beijing - outgoing flights
[Update 5/5/2012: Note that I wrote this code with the earlier version of ggplot (0.89). Apparently there is an issue with ggplot 0.9 and the fortify.SpatialLinesDataFrame function - please see the comments below and suggestion for a workaround. Thank you Einar!]
Claudia Engel, PhD, is the Academic Technology Specialist for the Department of Anthropology at Stanford University, where she also holds an appointment as lecturer. She collaborates with faculty on the use of innovative technologies in anthropological research and teaching. No TweetBacks yet. (Be the first to Tweet this post)more →