How to make interactive charts together with R language - r

I'm helping my friend make a website. He previously used R language to generate statistical charts. Now he want to generate some dynamic chart so that when users move mouse over certain part of the chart there will be some description/complementary information pops up for them to read. What kind of technology/tools/packages I can use for this purpose?
PS: I've explored some possible ways, yet none of them fits my needs. I've tried rggobi + ggobi. They can't coz they are not for web applications. iPlot can't do it coz it generates histogram only. I've thought about asking R produces some intermediate date which I can pass to some JavaScript packages like HighCharts. Yet, apparently R is much powerful than JS. R can generates some advanced type of charts which JS just can't do.

You should use R to generate the data and then export it in a format that a javascript framework for graphs can understand.
This way you could benefit from the advanced statistical analysis provided by R and the presentation layer of javascript.
Lots of solutions exist for this problem, but i've heard lots of good things about Raphael and its chart plugin, which you may want to investigate

The playwith package offers facilities to manipulate rgl graphics. A couple of links:
http://code.google.com/p/playwith/w/list
http://www.r-bloggers.com/playing-with-the-%E2%80%98playwith%E2%80%99-package/

Look at the sendplot package or the RSVGTipsDevice package.

Related

Visualization of R-Workflow through Flowchart in Alteryx-Way

I'm wondering if there are any packages for R which help to visualize workflows/code in a way Alteryx does. I find the visualization of the workflows within Alteryx quite helpful, but manually dragging an dropping the tools onto the canvas and set the parameters just takes so much longer than just writing the code in R. Also some functionally within Alteryx is not yet sufficient and has to be implemented via the R/Python-Tool anyway.
During my search I found this post which goes into the same direction, but the suggested packages don't really match what I am looking for.
Best regards

Exporting R to vector-based designed charts

I'm looking for ways to visualize data in vector-based images through R. Here are links to some examples of something I'm having designed:
https://dribbble.com/shots/2195053-The-Truth-About-B-zier-Graphs/attachments/405731
https://dribbble.com/shots/1728095-Line-Chart/attachments/278191
I understand there are some R libraries for SVG and other file types that permit export to higher quality designs, but haven't seen any tutorials or tools. Any direction is appreciated. I'm not even sure what steps would be necessary to dynamically generate charts like that through R.
Thank you.

Using Protovis with R

As question, I have satisfied with what R and ggplot2 can do for static graph, but what about interactive graphs? How combine R and Protovis to make the graphs?
There is somethings called rwebvis but seems it is no longer active.
Any suggestion? Thanks.
Well, first you need a web server. Ooh, R has one of those now. Then you need some way of generating output on the web from R code - ooh, R has one of those too:
http://jeffreybreen.wordpress.com/2011/04/25/4-lines-of-r-to-get-you-started-using-the-rook-web-server-interface/
So you can then write R server pages that return JSON-encoded data that you can feed to Protovis - or if you want to get right up to date, to D3, which is Protovis++ and made of win.
Iplots is a fairly useful package that allows interactive graphing ( by this I mean selection linking between graphs, color linking, etc). It has some limitations and is not really made for producing plots as much as exploring data trends.
Acinonyx also was recently updated which is supposed to be an updated version of iplots, but from what I can tell it still has some work to do.
Not familiar with protovis or rwebvis.
There is a package from google called googlevis that enables some interactivity. This produces plots that are embeddable online. If you like protovis, the same author has another library called D3.
For running R on a webserver, I have been experimenting with RApache, which enables you to link your R installation to an apache server.
If the interactivity does not to be online, RStudio have a package called manipulate which may also be of interest.

R bindings for Mapnik?

I frequently find myself doing some analysis in R and then wanting to make a quick map. The standard plot() function does a reasonable job of quick, but I quickly find that I need to go to ggplot2 when I want to make something that looks nice or has more complex symbology requirements. Ggplot2 is great, but is sometimes cumbersome to convert a SpatialPolygonsDataFrame into the format required by Ggplot2. Ggplot2 can also be a tad slow when dealing with large maps that require specific projections.
It seems like I should be able to use Mapnik to plot spatial objects directly from R, but after exhausting my Google-fu, I cannot find any evidence of bindings. Rather than assume that such a thing doesn't exist, I thought I'd check here to see if anyone knows of an R - Mapnik binding.
The Mapnik FAQ explicitly mentions Python bindings -- as does the wiki -- with no mention of R, so I think you are correct that no (Mapnik-sponsored, at least) R bindings currently exist for Mapnik.
You might get a more satisfying (or at least more detailed) answer by asking on the Mapnik users list. They will know for certain if any projects exist to make R bindings for Mapnik, and if not, your interest may incite someone to investigate the possibility of generating bindings for R.
I would write the SpatialWotsitDataFrames to Shapefiles and then launch a Python Mapnik script. You could even use R to generate the Python script (package 'brew' is handy for making files from templates and inserting values form R).

Implementations of "The grammar of graphics" in statistical packages

I am aware that Leland Wikinson's ideas, as exposed in his book "The Grammar of
Graphics" underlie ggplot2 implementation in R.
But are there other implementations of the same ideas in other statistical packages (SAS or other)?
In SPSS, the Chart Builder was built upon the same foundation. I could be wrong, but I think SPSS implemented it as "GPL." IMHO, Hadley's ggplot2 is much easier to learn and there are mounds of examples online; I haven't seen many examples of graphics built with GPL.
Not to mention, R can be obtained for the price of free.
It is not exactly the same, but SAS has (since 9.2) the ODS Graphics system in place. This graphics system is also based on the same foundation, and if you look at the examples here, you immediately notice the similarities in layout and buildup of these graphs and the ones in ggplot2.
THe idea is here to just get the graphs from the analysis, so you specify the content of the graph at the same time you specify your analysis. Then there is the template language for the ODS graphics to allow you to create your custom graphs. This is something I still miss a bit in ggplot2. But ggplot2 is quite a lot easier.
It seems IBM does some visualization tools with grammar of graphics inside.
They say their backend -- Rapidly Adaptive Visualization Engine (RAVE) -- is based on it.
And recently I found this overview-article about VizJSON -- a language to describe charts, which is apparently some variation of JSON. (I don't really know about SPSS, Many Eyes and the connection between them and other IBM's software. Probably SPSS is the back-end for Many Eyes... Probably VizJSON is the next step to their GPL... Whatever -- it is closed proprietary stuff anyway)
Also there is D3.js. It is open, BSD license. It is a javascript library. Here "javascript" does not mean "web only": you can make SVG files with your plots (and probably they will or already do support more). But it means that you need to know bunch of Web technologies: HTML, Javascript, DOM, CSS etc (+ maybe javascript's package manager..). And also people say it is quite a low-level library.
There is a more high-level tool, based on D3.js -- Vega.
I am not very savvy in these tools and cannot be totally sure about this information ;)
Python now has its own ggplot port.
Also, Tableau is a visualization system based firmly on the Grammar of Graphics (Wilkinson himself works there now). But I'm not sure if this counts, since it's not part of a pre-existing statistical package.

Resources