Site icon R-bloggers

Apollo Moon Landings

[This article was first published on R-Chart, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Welcome to the second in a series of posts of maps-to-places-I-am-unlikely-to-visit generated by R (the previous post is here).

A bit-o NASA data, the R threejs library and a few lines of code can be used to create an interactive map that identifies the landing locations of Apollo lunar landing missions.



The lunar map above is better viewed using the interactive version on RPubs.  The data was obtained from a NASA page.  For comparison, see Google’s Map of Apollo mission landing locations.  Additional information is included on this map on Wikipedia.

The data and code are on Github.  If you can believe it, all the R code required is as follows:

library(threejs)
moon_data = read.csv(“moon.csv”, stringsAsFactors=FALSE)
moon = system.file(“images/moon.jpg”, package=”threejs”)
globejs(img=moon, bodycolor=”#555555″, emissive=”#444444″, 
        lightcolor=”#555555″, lat=moon_data$Latitude.N, 
        long=moon_data$Longitude.E)



To leave a comment for the author, please follow the link and comment on their blog: R-Chart.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.