Skip to content

moosilauke18/ggvis

 
 

Repository files navigation

ggvis

Build Status

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 http://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

ggvis is not yet available on CRAN. You can install it from github with the following code:

# install.packages("devtools")
devtools::install_github(c("yihui/knitr", "rstudio/rmarkdown", "rstudio/shiny",
    "rstudio/ggvis"), build_vignettes = FALSE)

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

About

Interactive grammar of graphics for R

Resources

Stars

Watchers

Forks

Packages

No packages published