Interactive Grammar of Graphics

An implementation of an interactive grammar of graphics, taking the best parts of 'ggplot2', combining them with the reactive framework of 'shiny' and drawing web graphics using 'vega'.


ggvis

Status

ggvis is currently dormant. We fundamentally believe in the ideas that underlie ggvis: reactive programming is the right foundation for interactive visualisation. However, we are not currently working on ggvis because we do not see it as the most pressing issue for the R community as you can only use interactive graphics once you've successfuly tackled the rest of the data analysis process.

We hope to come back to ggvis in the future; in the meantime you might want to try out plotly or creating inteactive graphics with shiny.

Introduction

The goal of ggvis is to make it easy to describe interactive web graphics in R. It combines:

  • a grammar of graphics from ggplot2,

  • reactive programming from shiny, and

  • data transformation pipelines from dplyr.

ggvis graphics are rendered with vega, so you can generate both raster graphics with HTML5 canvas and vector graphics with svg. ggvis is less flexible than raw d3 or vega, but is much more succinct and is tailored to the needs of exploratory data analysis.

If you find a bug, please file a minimal reproducible example at https://github.com/rstudio/ggvis/issues. If you're not sure if something is a bug, you'd like to discuss new features or have any other questions about ggvis, please join us on the mailing list: https://groups.google.com/group/ggvis.

Installation

Install the latest release version from CRAN with:

install.packages("ggvis")

Install the latest development version with:

# install.packages("devtools")
devtools::install_github("rstudio/ggvis")

Getting started

You construct a visualisation by piping pieces together with %>%. The pipeline starts with a data set, flows into ggvis() to specify default visual properties, then layers on some visual elements:

mtcars %>% ggvis(~mpg, ~wt) %>% layer_points()

The vignettes, available from https://ggvis.rstudio.com/, provide many more details. Start with the introduction, then work your way through the more advanced topics. Also check out the various demos in the demo/ directory. See the basics in demo/scatterplot.r then check out the the coolest demos, demo/interactive.r and demo/tourr.r.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("ggvis")

0.4.10 by Hadley Wickham, 8 months ago


https://ggvis.rstudio.com/


Browse source code at https://github.com/cran/ggvis


Authors: Hadley Wickham [aut, cre] , Winston Chang [aut] , Posit [cph] , jQuery Foundation [cph] (jQuery library and jQuery UI library) , jQuery contributors [ctb, cph] (jQuery library; authors listed in inst/www/lib/jquery/AUTHORS.txt) , jQuery UI contributors [ctb, cph] (jQuery UI library; authors listed in inst/www/lib/jquery-ui/AUTHORS.txt) , Mike Bostock [ctb, cph] (D3 library) , D3 contributors [ctb] (D3 library; authors listed at https://github.com/d3/d3/graphs/contributors) , Trifacta Inc. [cph] (Vega library) , Vega contributors [ctb] (Vega library; authors listed at https://github.com/trifacta/vega/graphs/contributors) , Sebastián Décima [ctb, cph] (javascript-detect-element-resize library)


Documentation:   PDF Manual  


GPL-2 | file LICENSE license


Imports assertthat, dplyr, htmltools, jsonlite, magrittr, methods, rlang, shiny

Suggests knitr, lubridate, MASS, mgcv, rmarkdown, testthat


Imported by AeRobiology, MetaAnalyser.


See at CRAN