February 6, 2018

About Diamonds Dataset

The Diamonds dataset contains approx. 54,000 round cut diamond information. It holds price information along with carat, cut, clarity, color, dimension details.

Format

  • price - price in US dollars
  • carat - weight of the diamond
  • cut - quality of the cut (Fair, Good, Very Good, Premium, Ideal)
  • color - diamond colour, from J (worst) to D (best)
  • clarity - a measurement of how clear the diamond is
  • x - length in mm
  • y - width in mm
  • z - depth in mm
  • depth - total depth percentage / mean(x, y)
  • table - width of top of diamond relative to widest point

Coursera Reproducible Pitch

This is Cousera Course Project for Developing Data Products.

The projects are:

  • Write & Deploy a shiny application with associated supporting documentation

  • Share your server.R and ui.R code on github

A scatter plot used to draw a relationship between price and carat of diamonds. Also diamond clarity used to separate points on color. The data can be divided into rows/columns using facets.

The application URL: https://myshiny-project.shinyapps.io/C9-W4-ShinyApp/

Source code in GitHub: https://github.com/majisomnath/DevelopingDataProduct

Use of scatter plot in server.R

dataset <- diamonds[sample(nrow(diamonds), 5000),]
print(ggplot(dataset, aes(x = carat, y = price, color = clarity)) + geom_point())

Conclusion

  • Interactive application

  • User can change X, Y, Facet, Color attributes to make any analysis

  • The plot title can be changed using Text Box input

  • User can change data sample size to get more/less data in plot