Apollo Moon Landings

October 17, 2016
By

(This article was first published on R-Chart, and kindly contributed to R-bloggers)

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 on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Sponsors

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)