Data set Visualization made easy using Cool Google Viz & Coin Toss Prediction

Ganesh Sethuraman
Sun1 Jul 26 18:52:38 2015

An Approach to visualize any data set under the sky, this provides an easy to select and visualize data set. Also provides a way to do Coin toss predictions.

Background: Power of Data Selector

It is important to visualize data set to make any meaning prediction or discovery. The time series data are hard to visualize, this shiny apps help us solve this problem.

https://my-viz.shinyapps.io/viz_google_selector URL to look at the app

  • Fruits Data set
  • World Bank Data Set

Visualization: Input and Output Control

Input Controls

  • Ability to choose the data set (Time series) for Google motion chart based visualization

Output Control

  • Based on the selected input the data set a cool time series Google motion chart is shown to the user. Note that, depending on the data set it might take few more seconds to show the visualization.
library(WDI)
library(googleVis)
M <- gvisMotionChart(Fruits, "Fruit", "Year", options = list(width=600,height=400))
plot(M)

Visualization: Promises and Possibilities

This opens up a sea of options on what we can do with this

  • More data sets can be added in the future
  • More type of visualization can be added

Coin Toss: Prediction

This is simple prediction function, which uses a random function for predictions, given a seed value.

predictToss <- function(seed=1000){
    set.seed(seed)
    t <- sample(c(1:2),1)
    if (t == 1)
         "HEADS"
    else 
         "TAILS"
} 
# Let us test this code
predictToss(1234)
[1] "HEADS"

Coin Toss & Data set Visualizations

Input Controls

  • Here the input control is really seed value

Output

  • The Output is the value random coin toss value based on the input seed.