Diamond data plotting with plot_ly

H.S.

January 18, 2018

Scope

Create Date: January 18, 2018

Scope of the assignment 3:
Create a web page presentation using R Markdown that features a plot created with Plotly. Host the webpage on either GitHub Pages, RPubs, or NeoCities. This webpage must contain the date that created the document, and it must contain a plot created with Plotly.

Data Processing

library(ggplot2)
library(plotly)
data("diamonds")
data_small <- diamonds[sample(nrow(diamonds), 1000),]
dim(data_small)
## [1] 1000   10

Plot

plot_ly(data_small, x = ~carat, y = ~price, 
        type = "scatter", 
        color = ~carat, 
        size = ~carat, 
        text = ~paste("Price: $", price, '<br>Cut: ', cut, '<br>Clarity: ', clarity, '<br>Color: ', color))

THANK YOU!