-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDiamondSlides.Rmd
70 lines (59 loc) · 2.49 KB
/
DiamondSlides.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
title: "Shiny App and Reproducible Pitch"
author: "Vadim Katsemba"
date: "November 14, 2016"
output: ioslides_presentation
---
##Overview
The application was designed as part of the final
project for the Developing Data Products class as part
of Coursera's Data Science Specialization.
The link to the application itself is at:
https://vkat722.shinyapps.io/Diamonds/
The source code for the ui.r and server.r files can be
found at the GitHub repository: https://github.com/vkatsemba/DevelopingDataProducts
##Functionality
The application is used to predict the price of a diamond
based on its weight.
The slider allows you to select the diamond's weight and an
interactive plot displays two lines indicating the price
using two different linear models.
It's up to you to decide what price you think is more accurate
for a particular diamond.
##Dataset
Here's the summary of the diamonds dataset.
```{r, echo=FALSE}
library(ggplot2)
data("diamonds")
summary(diamonds)
```
```
carat cut color clarity
Min. :0.2000 Fair : 1610 D: 6775 SI1 :13065
1st Qu.:0.4000 Good : 4906 E: 9797 VS2 :12258
Median :0.7000 Very Good:12082 F: 9542 SI2 : 9194
Mean :0.7979 Premium :13791 G:11292 VS1 : 8171
3rd Qu.:1.0400 Ideal :21551 H: 8304 VVS2 : 5066
Max. :5.0100 I: 5422 VVS1 : 3655
J: 2808 (Other): 2531
depth table price
Min. :43.00 Min. :43.00 Min. : 326
1st Qu.:61.00 1st Qu.:56.00 1st Qu.: 950
Median :61.80 Median :57.00 Median : 2401
Mean :61.75 Mean :57.46 Mean : 3933
3rd Qu.:62.50 3rd Qu.:59.00 3rd Qu.: 5324
Max. :79.00 Max. :95.00 Max. :18823
x y z
Min. : 0.000 Min. : 0.000 Min. : 0.000
1st Qu.: 4.710 1st Qu.: 4.720 1st Qu.: 2.910
Median : 5.700 Median : 5.710 Median : 3.530
Mean : 5.731 Mean : 5.735 Mean : 3.539
3rd Qu.: 6.540 3rd Qu.: 6.540 3rd Qu.: 4.040
Max. :10.740 Max. :58.900 Max. :31.800
```
##Scatterplot
This scatterplot compares the weight(carat) against the price.
```{r, echo=FALSE}
plot(~carat+price, data=diamonds)
```
![](https://github.com/vkatsemba/DevelopingDataProducts/blob/master/DiamondScatterPlot.png?raw=TRUE)