Let's clarify the successor to ggvis

ggplot2

#1

R’s Shiny/web-facing answer to ggplot seemed at one point to be ggvis, but the package hasn’t been developed or seriously maintained for a while now and probably deserves an official send off.

It would be great to have some clarity about where the Tidyverse is heading in terms of synthesising the grammar of graphics philosophy with the DOM power of D3. There are a few competing packages out there, but it feels like there is a bit of a vision gap in this area. But I may well be a bit out of touch with latest thinking, so would be great to hear what prevailing views are.


Future packages to be added to the tidyverse
What cool javascript libraries should become HTMLwidgets?
New version of r4ds that incorporates ggvis?
Interactive base R plot in shiny
#2

Plotly has turned into my go to shiny data viz tool. The R package is open source and installable via CRAN or https://github.com/ropensci/plotly. In addition to providing a nice API for interacting with the JavaScript plotly library, it also has the function ggplotly that lets you stick in a plot created by ggplot2 (though more advanced plots sometimes lose little bits of functionality with the generated tooltips).

There are a bunch of other R to JavaScript libraries out there – see http://gallery.htmlwidgets.org for a huge list – and I’ve tried dozens of them, but plotly has just gotten better and better over the past couple years and the MIT license means I can do whatever I want with it.


Best package for interactive graphs in Shiny
#3

Let’s clarify the successor to ggvis

Perhaps we can clarify the future of ggvis first?


#4

I vaguely remember Hadley talking about a “year of ggvis” what feels like years ago. I had high hopes for ggvis and would love some official statement about its status.

While plotly is powerful, it’s ggplot’s modular approach I liked in ggvis and now miss in other packages, so i really hope there’ll be a new destination for ggvis-like efforts.


#5

Well here’s the commit history - it looks to me like it’s being retired…


#6

Sure. But since @winston and @hadley are here, it would be nice if they could clarify.

Personally, I would prefer development of ggvis over some of the other alternatives.


#7

It is currently lying fallow. It’s highly likely that I will work on it again in the future, but at the moment interactive graphics does not seem like the most pressing problem for me to work on.


Why doesn't R packages get more Star on Github
#8

This thread was just as sad I’d feared it would be :frowning:

I think there is a lot of value in interactive graphics, AND a graphics package that makes full use of the %>% operator instead of the +. Maybe it’s nitpicky, but I find it somewhat frustrating to switch from using one operator to the other in a long chain.


#9

I’ve always found plotly to be too heavy to use, unfortunately…


#10

I will second this sentiment. Datavisualization is critically important. The absence of the %>% makes ggplot a outlier in the tidyverse. I would love to see ggvis become a priority


#11

I personally have run into issues with plotly not rendering quite as much as I’d like when I’m making ggplot2 charts - I tend to rely on the ggiraph extension: http://davidgohel.github.io/ggiraph/ I feel that it works as well as ggplotly() does, but it keeps that ggplot2 look and feel, and it’s really not that difficult to use.


#12

I prefer ggiraph too, and it works well in Shiny. I actually think of it as the future of ggvis :grin:


#13

I like the look and feel of plotly graphs very much, and in my experience they integrate into Rmarkdown documents well. But they’re not truly interactive in the way a shiny visualization can be interactive. Shiny, on the other hand, doesn’t feel ‘live’ and responsive the way a D3 object does. So I end up choosing one or the other, but ultimately unsatisfied with both.


#14

I’ll throw in my vote for having ggvis as well, though I obviously realize Hadley & co have tons of packages and other things to work on. As someone who uses shiny daily and does a lot of viz in shiny, I unfortunately have yet to find an interactive viz library that I’m happy with. There are many interactive viz libraries that are compatible with shiny, but none feel complete. I still end up using ggplot (or something plotly::ggplotly()) often because it’s so much more powerful and customizable and bug-free compared to the alternatives.

TLDR; I’d also love to see ggvis get some love :slight_smile:


#15

I do a lot in RMarkdown and always head up my code

library(tidyverse)
library(plotly)

plotly is a bit of a learning curve but is comprehensive and here to stay (plotly.js used for python as well)

Carson Sievert is maintainer of the package and is very responsive. He has also written an excellent
bookdown book Plotly for R

There are other packages that can be used as supplements, if needed, but this covers most requirements for
interactive graphics


#16

If I’m not mistaken ggiraph uses D3.js and ggvis uses Vega. Is one library superior to the other? Plotly seems too heavy/slow to me as well at least for quick EDA. Had a quick survey a while back and plotly did come up way first though: https://plus.google.com/+MelanieBacou/posts/FA2JgeEyRpB


#17

Yes! I got a bit of interest in forming a working group for this a few months ago. We started a group: https://github.com/ropenscilabs/rivis/

The conversation died off, probably partly my fault, but I was getting a handle on being a new dad :stuck_out_tongue:

There was a reading list put together on the subject, which may interest you. Feel free to join the conversation.


What cool javascript libraries should become HTMLwidgets?
#18

The more I play with Vega-lite, the more I am convinced this represents the future of this space. Bob Rudis has actually done a LOT of work mapping it to R with ggplot2 style bindings see: https://github.com/hrbrmstr/vegalite they probably need an update.

I would encourage anyone who’s interested in interactive vis to check out the Vega-lite talk from OpenVisConf2017: https://youtu.be/9uaHRWj04D4


#19

https://github.com/sachsmc/gginteractive has sprung up in the last week and looks promising! I particularly like the approach it and ggiraph appear to take of exporting to SVG and manipulating: plotly is a super powerful plotting API, and Carson Sievert has helped me out tremendously in getting my head around it, but I’ve also struggled with some of its limitations around non-native grobs.


#20

I’m going to be the hippie and say maybe it’s best if instead of one package, we had a family of packages? I think the htmlwidgets do that, with crosstalk binding them together, it’s as if it were one package… Except that there is more functionality than could ever fit (or should fit) into any one package. Consistent with the philosophy of smaller more functional packages.

The counter to this point is that ggplot2 does almost everything… But interactivity includes things like tables, or 1 number infoboxes… Things outside of ggplot2’s purview. So maybe many packages designed to work together is the perfect answer? In R we have the tidyverse… For interactive via we have htmltools?

Granted… My answer doesn’t say how to make this line chart interactive…