We've looked before at how you can annotate geographical maps using R, but what if you want to overlay data onto a globe of the Earth, using Google Earth? The RKML package for R (from the OmegaHat project) allows you to do just that, by providing a high-level interface from R to generate KML files, which in turn are used to drive animations in Google Earth.
Here's one very cool example of its use: at the blog Mind of a Markov Chain you can find an animation of the Deepwater Horizon oil spill, overlaid with the tracks of tuna migrations. Here's a screenshot:
Follow the link below for the animation, where you'll see that the migration paths intersect with the spill (in both time and space). This animation was created with fewer than 30 lines of R code, which you can also find at the link.
Mind of a Markov Chain: R and Google Earth ~ comparing tuna tracks vs. Gulf of Mexico oil spill extent
> This animation was created with fewer than 30 lines of R code,
of which 25 of them are for styling :)
Posted by: apeescape | August 06, 2010 at 13:31
Link is closed now and requires a login.
Not helpful.
Posted by: Adam | May 04, 2011 at 20:34