Publications by Riddhiman

Tufte style visualizations in R using Plotly

19.04.2016

This post is inspired by Lukasz Piwek’s awesome Tufte in R post. We’ll try to replicate Tufte’s visualization practices in R using Plotly. You can read more about Edward Tufte here. One easy way to replicate the graphs showcased on Lukasz’s blog would be to simply use ggplotly() on his ggplot2() code. We’ll use plot_ly()...

1014 sym R (6479 sym/5 pcs) 1 img

Candlestick charts using Plotly and Quantmod

24.04.2016

This post is dedicated to creating candlestick charts using Plotly’s R-API. For more information on candlestick charts visit www.stockcharts.com. We’ll also showcase Plotly’s awesome new range selector feature ! plotlyCandleStick <- function(symbol = "MSFT", fillcolor = "#ff6666", ...

634 sym R (6771 sym/1 pcs) 1 img

Ternary Plots in R using Plotly

02.05.2016

Plotly now supports ternary plots ! and in this post we’ll showcase how to make such charts in R. library(plotly) library(jsonlite) URL <- "https://gist.githubusercontent.com/davenquinn/988167471993bc2ece29/raw/f38d9cb3dd86e315e237fde5d65e185c39c931c2/data.json" ds <- fromJSON(txt = "URL") colors = c('#8dd3c7','#ffffb3','#beb...

540 sym R (3944 sym/4 pcs) 1 img

Shiny Apps Gallery using Plotly in R

07.05.2016

Announcing the new shiny apps gallery that showcases the use of Plotly’s R API in Shiny Applications. You can visit the gallery here: https://plot.ly/r/shiny-gallery/ Apps showcase the use of a variety of plotly features including: Adding interactive plotly graphs using plotlyOutput() Embedding ggplot style visualizations using ggplotly() Acc...

1065 sym 6 img

Gantt Charts in R using Plotly

10.05.2016

Gantt Charts are a great way to keep track of timelines, progress of specific aspects of the project and resource utilization. Project Managers and anyone familiar with Microsoft Project would be familiar with Gantt Charts. Here’s how to make one in R using Plotly’s R API. library(plotly) # Read in data df <- read.csv("https://cdn.rawgi...

679 sym R (3176 sym/1 pcs) 1 img

Bullet Charts in R using Plotly

15.05.2016

This post is inspired by Mike Bostock’s implementation of bullet charts – http://bl.ocks.org/mbostock/4061961 library(plotly) library(jsonlite) library(dplyr) # Read data df <- fromJSON(txt = url("https://cdn.rawgit.com/plotly/datasets/master/BulletData.json")) # Convert to conventional format df <- t(apply(df, 1, function(vec){ ve...

509 sym R (4908 sym/1 pcs)

ggplot2 docs completely remade in D3.js

26.05.2016

Carson Sievert from Plotly recreated Hadley Wickam’s entire ggplot2 documentation using Plotly’s open-source ggplotly converter – http://ropensci.github.io/plotly/ggplot2/. This makes every ggplot2 graph interactive and drawn in D3.js ! position_jitterdodge scale_color_brewer stat_summary_hex geom_violin geom_smooth geom_polygon geom_...

885 sym 1 img

Visualizing Bootrapped Stepwise Regression in R using Plotly

29.05.2016

We all have used stepwise regression at some point. Stepwise regression is known to be sensitive to initial inputs. One way to mitigate this sensitivity is to repeatedly run stepwise regression on bootstrap samples. R has a nice package called bootStepAIC() which (from its description) “Implements a Bootstrap procedure to investigate the variab...

2438 sym R (5086 sym/3 pcs)

Trisurf Plots in R using Plotly

01.06.2016

In this post we’ll show how to create Triangular Surface Plots in R. This post is based on timelyportfolio’s gist. Moebius Strip library(plotly) library(geometry) g <- expand.grid( u = seq(0, 2 * pi, length.out = 24), v = seq(-1, 1, length.out = 8) ) tp <- 1 + 0.5 * g$v * cos(g$u / 2) m <- matrix( c(tp * cos(g$u), tp * sin(g$u), 0.5 *...

584 sym R (2874 sym/3 pcs)

Radial bar charts in R using Plotly

10.06.2016

Creating a radial barchart is fairly easy using plotly. In this post we’ll focus on modifying a radial line chart to make it look like a bar chart so come up with a nice visualization for CO2 emissions. The visualization is inspired by this awesome chart. # inspired by # https://s-media-cache-ak0.pinimg.com/736x/22/1a/d0/221ad079e362ba13969b...

657 sym R (5910 sym/1 pcs)