-install.packages("ggvis") will install all the required packages you need for visualization through ggvis
-library(ggvis) will call the ggvis package to be used in your visualization
Here I am using the dataset mtcars and visualising it through layer points.
I have taken the mtcars dataset and visualized the multiple layers using different strokes
I have taken season dataset here, and season is a categorical variable. And we have grouped it and then used stroke to highlight the different seasons.
Popular In-Built plot types
Global Vs Local properties
ggvis & interaction ()
We can also group data based on interaction of two or more variables. group_by() creates unique groups for each distinct combination of values within the grouping variables.
ungroup() can remove the grouping information.
interaction() can map the properties to unique combinations of the variables
layer_model_predictions() plots the prediction line of a model fitted to the data.
layer_model_predictions(model = "lm")
ggivs comes several widgets such as
input_slider(), and input_text().
label = "ABCD " , choices = c("red","black") -
value = "black" - Used with input_text()
map = as.name used when we want to return variable names
Are the common arguments inside these functions.
Data Visualization in R through ggvis Cheat Sheet by anujshukla
This cheat sheet is made for the ggvis library in R for effective visualization of data