Questions tagged [ggvis]

The goal of ggvis is to make it easy to describe interactive web graphics in R. It fuses the ideas of ggplot2 and shiny, rendering graphics on the web with vega (so one can draw on the canvas or using svg). It is less flexible than raw d3 or vega, but much more succinct and is tailored to the needs of exploratory data analysis.

From the author(s):

ggvis is a data visualization package for R which lets you:

  • Declaratively describe data graphics with a syntax that is similar to ggplot2.
  • View and interact with the graphics on your local computer, or use them in an interactive web application with shiny.
  • Data manipulation and transformation are done in R, and the graphics are rendered in a web browser, using vega. For RStudio users, ggvis graphics display in a viewer panel, which is possible because RStudio is a web browser.

Data manipulation and transformation are done in R, and the graphics are rendered in a web browser, using Vega. For RStudio users, ggvis graphics display in a viewer panel, which is possible because RStudio is a web browser.

486 questions
5
votes
1 answer

R Horizontal Stacked ggvis Barplot

Using this small dataset: df <- structure(list(colour = structure(c(1L, 2L, 1L, 2L), .Label = c("Black", "White"), class = "factor"), variable = c("A", "A", "B", "B"), value = c(1, 2, 0.74, 0.85)), row.names = c(NA, -4L), .Names = c("colour",…
cdeterman
  • 19,630
  • 7
  • 76
  • 100
5
votes
1 answer

R ggvis multiple plots from single data frame

I've searched, so please forgive me if I'm missing something. Let's assume a dataframe that contains Name, Date, Calories, where Calories is the total number of calories that person consumed that day. Name Date Calories Amy 1/1/01 …
John Tarr
  • 717
  • 1
  • 9
  • 21
5
votes
0 answers

When using ggvis with data table I'm receiving "Error: This code should not be reached"

When I type the following code library(data.table) library(ggvis) age <- as.integer(c(1,4,8,5,4,3,2,4,5,4,3)) disk <- c(3,3,3,3,3,3,3,3,3,3,3) dt <- data.table(age, disk) df <- data.frame(age, disk) dt %>% ggvis(x=~age) %>% …
Eugene Brown
  • 4,032
  • 6
  • 33
  • 47
5
votes
0 answers

Install v2png program from vega (node.js module) on Windows

The export_png() function in the R ggvis package requires us to have the program vg2png installed, from the node.js module vega. (source: R Documentation ) I have node and npm installed on windows, and I ran npm install vega. This is the output that…
shrgm
  • 1,315
  • 1
  • 10
  • 20
5
votes
1 answer

ggvis side-by-side barchart grouped by second variable

I am in process of migrating from Excel to ggvis for data analysis. For a typical grouped bar chart with two variables, however I have difficulty to plot bar chart side-by-side instead of stacked. The following data has four steps A, B, C, D with…
Rick
  • 229
  • 1
  • 3
  • 11
5
votes
2 answers

Add Interactive Chart to Shiny with HTML UI (index.html)

I can see how ggvis, rCharts, etc. fits in with a server.r + ui.r construction. I'm now trying to make an HTML UI but am and unable to find any clues about passing an interactive chart to an HTML UI. Any clues? Investigated for ggvis, rCharts, NBD3.…
TheComeOnMan
  • 12,535
  • 8
  • 39
  • 54
5
votes
1 answer

ggvis line chart with interactive x axis range

I'd like to be able to Plot a line chart in ggvis Add two interactive controls, which allow me to set the min and max x values on the chart This sounds pretty straightforward - my code is: minx = minx = input_numeric(1, 'Min x-val') maxx =…
user3279453
  • 403
  • 1
  • 3
  • 12
5
votes
1 answer

What is the correct way of drawing stacked area plots in ggvis?

I am trying to draw at stacked area plot using the new ggvis package. In ggplot, I have managed to do it like this: d<- data.frame( time=as.numeric( rep( 1:100, 100 ) ), class=as.factor( sample( 7, 100000, replace=TRUE ) ) ) t <-…
jtatria
  • 527
  • 3
  • 12
5
votes
0 answers

dynamic filtering with input_select() using ggvis in R

I'm using the built in "cocaine" database that comes with the ggvis package in R to visualize the potency counts of cocaine in each state. The R package dplyr was also used. Here's the first six lines of the cocaine dataset: state potency weight…
fronk
  • 51
  • 3
5
votes
2 answers

How to put multiple graphs in one plot with ggvis

Sample data: y1 = c(1,2,3,4) y2 = c(6,5,4,3) x = c(1,2,3,4) df = data.frame(x,y1,y2) My Question: I would like to combine the following two graphs into one, using ggvis: df %>% ggvis(~x,~y1) %>% layer_paths() df %>% ggvis(~x,~y2) %>%…
Alex
  • 15,186
  • 15
  • 73
  • 127
5
votes
1 answer

Adding ggvis plot in RMarkdown document makes knitr::kable output render incorrectly

Reproducible example below. I lose formatting on the table whenever I include a ggvis figure. --- title: "test" output: html_document --- ```{r setup, include=FALSE} library(dplyr) library(ggvis) library(knitr) ``` The following table looks…
kevinykuo
  • 4,600
  • 5
  • 23
  • 31
5
votes
0 answers

ggvis interactive figure does not work as expected using reactive values

I am having problem with the following example ggvis code which is meant to make a plot that highlights an entire group of points when you hover over any member of that group. I would then like the highlighting to vanish as soon as you hover off.…
ecologician
  • 473
  • 3
  • 9
4
votes
0 answers

Implementing separate hover and click tooltips with ggvis

I want to implement a hover tooltip to view a summary detail and a click tooltip for full details, which includes some hyperlinks. I can implement these separately, but when implemented together the hover action also kills the click tooltip on on…
geotheory
  • 22,624
  • 29
  • 119
  • 196
4
votes
1 answer

How to modularize a dynamic ggvis chart in shiny?

My app has a few charts, and I would like to draw them in a sperate script in order to have a cleaner server.R which then contains only the bind_shiny calls. Also, because I would like to recycle some of the building blocks of my charts, I would…
Dambo
  • 3,318
  • 5
  • 30
  • 79
4
votes
1 answer

How do I set max dimensions of a ggvis chart embedded in a shiny app?

I am using set_options(width = "auto", height = "auto", resizable=FALSE) to auto-size a ggvis chart. It works fine when the chart is the only element in the column function, but if I add other elements, the chart keeps resizing to the infinite. I…
Dambo
  • 3,318
  • 5
  • 30
  • 79
1 2
3
32 33