An interactive map for Indian Pincode.
An audio processing example which allows for exploration in parametric, symbolic, diagramatic and visual ways.
The smartphone, tablets and PCs installed base as interactive barchart and mosaic charts.
6 June 2014
An interactive map for Indian Pincode.
An audio processing example which allows for exploration in parametric, symbolic, diagramatic and visual ways.
The smartphone, tablets and PCs installed base as interactive barchart and mosaic charts.
Conceptual Model <—> Real World
Reduce the Gulf of Execution & Gulf of Evaluation between these two.
Gulf of Execution
The difference between the user’s intentions and the allowable actions.
Gulf of Evaluation
The amount of effort that the person must exert to interpret the state of the system and to determine how well the expectations and intentions have been met.
Reference: The Design of Everyday Things - Don Norman
library(ggplot2) ggplot(diamonds, aes(price)) + geom_histogram(binwidth = 500)
ggplot(diamonds, aes(carat, price)) + geom_point()
Static Graphics
Interactive Graphics
Within R - locator() and identify()
Desktop based (RStudio / Java / Qt)
Browser based (HTML, SVG, CSS, JavaScript)
Use pointing to identify points in a scatter plot and put label them.
# Identify point in a scatterplot attach(mtcars) plot(mpg, wt) identify(x = mpg, y = wt, n = 3, label = row.names(mtcars))
Used to read the position of the graphics cursor (when the mouse pressed). Those positions will be then plotted as points or joined by lines.
# Locate points on a scatterplot attach(mtcars) plot(mpg, wt) # draw up to 3 points locator(n = 3, type="p") # draw up to 4 points joined by lines locator(n = 4, type="l")
Takes a plotting expression and a set of controls (e.g. slider, picker, checkbox, or button) to dynamically change values within the expression.
When a value is changed using its corresponding control the expression is automatically re-executed and the plot is redrawn.
library(ggplot2) library(manipulate) manipulate(ggplot(diamonds, aes(price)) + geom_histogram(binwidth = bin), bin=slider(40, 500))
A general purpose statistical data-visualization system written in JAVA. Available as R package called "iplots", though needs Java Gui for R (JGR) instead of RStudio for full functionality.
Works with tsv and csv files and loads data from R workspace.
Excellent interactive visualization techniques for data of almost any kind, including Categorical Data, Geographical Data and LARGE Data.
Fully linked plots, and offer many interactions and queries. Any case selected in a plot in Mondrian is highlighted in all other plots.
Currently implemented plots comprise Histograms, Boxplots y by x, Scatterplots, Barcharts, Mosaicplots, Missing Value Plots, Parallel Coordinates/Boxplots, SPLOMs and Maps.
Save the diamonds dataframe
library(ggplot2) data(diamonds) str(diamonds) save.image(file="diamonds.RData")
Download and install Mondrian from http://rosuda.org/mondrian/
Load the diamonds.RData file and start exploring
Builds interactive web applications from R.
Each Shiny App has two components:
install.packages('shiny') library(shiny) runExample("01_hello") runExample("05_sliders")
Any one with the files ui.R and server.R can run the visualization inside R Studio
# This is the server logic for a Shiny web application. library(shiny) shinyServer(function(input, output) { output$distPlot <- renderPlot({ # generate bins based on input$bins from ui.R x <- faithful[, 2] bins <- seq(min(x), max(x), length.out = input$bins + 1) # draw the histogram with the specified number of bins hist(x, breaks = bins, col = 'darkgray', border = 'white') }) })
# This is the user-interface definition of a Shiny web application. library(shiny) shinyUI(fluidPage( # Application title titlePanel("Old Faithful Geyser Data"), # Sidebar with a slider input for number of bins sidebarLayout( sidebarPanel( sliderInput("bins", "Number of bins:", min = 1, max = 50, value = 30)), # Show a plot of the generated distribution mainPanel( plotOutput("distPlot")) ) ))
You can share your shiny files and anyone can run it in RStudio.
To make it accesible to everyone without RStudio, you need a Shiny Server to host the files.
Free hosting (at the moment) at https://www.shinyapps.io/
Diamonds dataset hosted on shinyapps
To create, customize and publish interactive javascript visualizations from R using a lattice style plotting interface
require(devtools) install_github('rCharts', 'ramnathv') library(rCharts) hair_eye_male <- subset(as.data.frame(HairEyeColor), Sex == "Male") n1 <- nPlot(Freq ~ Hair, group = "Eye", data = hair_eye_male, type = "multiBarChart") n1$print("chart3")
Creates web pages with interactive charts based on R data frames, using the Google Chart Tools.
Display them either via the local R HTTP help server or within their own sites, without uploading the data to Google.
library(googleVis) plot(gvisMotionChart(Fruits, "Fruit", "Year")) ## Can create the gapminder type graphs ## Caution: Takes a long time to load demo(WorldBank)
Interactivity in R Graphics is rapidly developing. Keep track of developments across packages.
Good visualizations are task dependent. Design for the data and domain.
Think what interactions would be helpful to explore the data: Navigation, Selection / Annotation, Filtering, Sorting, Dynamic Queries