interactive.eda_plotly: Interactive Dashboard for Exploratory Data Analysis (Plotly)

Description Usage Arguments Details Value Examples

Description

This function runs an interactive dashboard which allows to explore data via 3djs and Plotly (using Plotly or Plotly+ggplot2). Unlike its counterpart interactive.eda_ggplot, using 3djs is not efficient for large data (10K+ observations) and automated smart plotting is not available. You should use this function over interactive.eda_3djs, which performs poorly compared to its plotly counterpart. When specific variables are mandatory, the interactive dashboard will warn you with a star preceding the element which is mandatory to be used. In addition, make sure your variables are in the right formats, as columns may be turned into factors (this is true for facetting, coloring...).

Usage

1
2
interactive.eda_plotly(data, type = "scatter", plot_width = 1500,
  plot_height = 820, f_back = "red", side_width = 300)

Arguments

data

Type: name reference to a data.table (preferred) or data.frame. The data you want to explore. Using a data.table increases the processing speed.

type

Type: character. The type of plot to preselect (but it does nothing itself). You may choose between "scatter", "bar", "pie", "histogram", "histogram2d", "box", "contour", "heatmap", "polar", "scatter3d", "surface", "geom_density", "geom_density_2d", "stat_density_2d", "geom_bar", "geom_point", and "geom_boxplot". Defaults to "scatter".

plot_width

Type: numeric. The width for the plot. Defaults to 1500, which fits nicely Full HD screens (1920 vertical pixels).

plot_height

Type: numeric. The height for the plot. Defaults to 820, which fits nicely Full HD screens (1080 vertical pixels).

f_back

Type: character. A background color character for the header. Defaults to "red".

side_width

Type: numeric. The width of the sidebar containing variable names. Defaults to 300.

Details

Plotting is done using plotly, which must be loaded before running this function. You must import data as data.table if you want maximum performance, although you will probably not notice any difference unless you are playing with millions of rows. For kernel estimation, you need the MASS package. There are issues if you open this in Internet Explorer 9 or under.

The colors (header: f_back) allowed are the following:

blue

blue color

black

black color

purple

purple color

green

green color

red

red color

yellow

yellow color

Value

Nothing

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
library(shiny)
library(shinydashboard)
library(MASS)
library(plotly)
library(datasets)
hair_eye <- as.data.frame(HairEyeColor)
interactive.eda_plotly(data = hair_eye,
                       type = "scatter",
                       plot_width = 600,
                       plot_height = 420,
                       f_back = "red",
                       side_width = 300)

## End(Not run)

Laurae2/Laurae documentation built on May 8, 2019, 7:59 p.m.