A web-based graphics application based on R

December 24, 2009
By

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

FlowingData recently took a look at Jeroen Ooms' latest web-based statistical tool based on R. We've looked at his tools for random-effects models and finance visualizations before, but this one is a more general tool for creating graphs from data sets using the ggplot2 package. It's pretty slick. All you need to do is upload a data set (in comma-separated .csv or tab-delimited .txt format) and then you can use the grammar of graphics philosophy underlying ggplot2 to layer various graph types using your data, and also to facet it (like panels in Trellis or lattice) by categorical variables. Here's an example I created in just a few minutes using the cereals dataset from the Data and Story Library:

Cereals

If you want to try it out yourself, a trick is that most of the interaction is through right-clicking on the middle pane where the graphics appear: use the menus to set up your X and Y variables, and then choose the type of graphic with the "New Geom Layer (2D)" menu. There are many other features, which you can see in action in the video below. But the best feature of all, which I would have missed except for the video, is that it shows you the code to create the graph in R using ggplot2. There's a tiny tiny arrow at the very bottom of the application: click it to show the code pane. The code it displays is exactly the code you would write as an R programmer to create the chart. This makes Jereon's application a really useful tool for learning the capabilities and syntax of ggplot2.  



Jeroen Oons: ggplot2 (via FlowingData)

To leave a comment for the author, please follow the link and comment on his blog: Revolutions.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: 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...

Tags: ,

Comments are closed.