14/06/2020

R Markdown Presentation & Plotly for diamonds data

This is an R Markdown document using ioslides as output for presentation. Here Plotly is used to plot graphical output.Here we are using diamonds data set for graph. Diamonds with lower quality cuts (cuts are ranked from “Ideal” to “Fair”) tend to be be larger.Likewise, diamonds with worse color (diamond colors are ranked from J (worst) to D (best)) tend to be larger,The pattern present in cut and color is also present in clarity. Diamonds with worse clarity (I1 (worst), SI1, SI2, VS1, VS2, VVS1, VVS2, IF (best)) tend to be larger.These patterns are consistent with there being a profitability threshold for retail diamonds that is a function of carat, clarity, color, cut and other characteristics. A diamond may be profitable to sell if a poor value of one feature, for example, poor clarity, color, or cut, is be offset by a good value of another feature, such as a large size.

diamonds data

## # A tibble: 500 x 10
##    carat cut       color clarity depth table price     x     y     z
##    <dbl> <ord>     <ord> <ord>   <dbl> <dbl> <int> <dbl> <dbl> <dbl>
##  1 1.14  Premium   H     SI1      62.1  59    4463  6.73  6.61  4.14
##  2 0.71  Ideal     E     VS2      62.5  56    3304  5.69  5.71  3.56
##  3 1.51  Premium   E     SI1      62.8  59   11565  7.3   7.26  4.57
##  4 0.6   Very Good F     VVS1     61.2  58    3333  5.42  5.46  3.33
##  5 0.35  Ideal     G     IF       61.8  55    1116  4.56  4.54  2.81
##  6 0.570 Premium   F     SI2      60.4  58    1247  5.4   5.37  3.25
##  7 1.66  Good      F     I1       62.1  57.7  6025  7.56  7.6   4.71
##  8 0.33  Ideal     G     IF       61.6  53     984  4.43  4.47  2.74
##  9 0.76  Ideal     D     VS2      61.2  57    3443  5.89  5.91  3.61
## 10 0.75  Premium   D     SI1      61.3  59    2484  5.89  5.82  3.59
## # ... with 490 more rows

Developing Data Products