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:
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.