29/12/2018

Instructions

Create a web page presentation using R Markdown that features a plot created with Plotly. Host your webpage on either GitHub Pages, RPubs, or NeoCities. Your webpage must contain the date that you created the document, and it must contain a plot created with Plotly. We would love to see you show off your creativity!

Review criteria

  1. Does the web page feature a date and is this date less than two months before the date that you're grading this assignment?

  2. Is the web page a presentation and does it feature an interactive plot that appears to have been created with Plotly?

Basic 3D Scatter Plot: Code

suppressMessages(require(plotly))

mtcars$am[which(mtcars$am == 0)] <- 'Automatic'
mtcars$am[which(mtcars$am == 1)] <- 'Manual'
mtcars$am <- as.factor(mtcars$am)

p <- plot_ly(mtcars, x = ~wt, y = ~hp, 
             z = ~qsec, color = ~am, 
             colors = c('red', 'blue')) %>%
  add_markers() %>%
  layout(scene = list(xaxis = list(title = 'Weight'),
                     yaxis = list(title = 'Gross horsepower'),
                     zaxis = list(title = 'Quarter of a mile time')))

Basic 3D Scatter Plot