[1] "Tesla, Inc. designs, develops, manufactures, leases, and sells electric vehicles, and energy generation and storage systems in the United States, China, and internationally. It operates in two segments, Automotive, and Energy Generation and Storage."
[1] "The company was formerly known as Tesla Motors, Inc. and changed its name to Tesla, Inc. in February 2017. Tesla, Inc. was incorporated in 2003 and is headquartered in Austin, Texas."
[1] "The dataset includes the daily Tesla stock price."
Date Open High Low Close Adj.Close Volume
1 2010-06-29 1.266667 1.666667 1.169333 1.592667 1.592667 281494500
2 2010-06-30 1.719333 2.028000 1.553333 1.588667 1.588667 257806500
3 2010-07-01 1.666667 1.728000 1.351333 1.464000 1.464000 123282000
4 2010-07-02 1.533333 1.540000 1.247333 1.280000 1.280000 77097000
5 2010-07-06 1.333333 1.333333 1.055333 1.074000 1.074000 103003500
6 2010-07-07 1.093333 1.108667 0.998667 1.053333 1.053333 103825500
[1] "In tesla share market rating that open and high has relationship when the open is high within end of the day it increase high of the day attribute"
[1] "In tesla share market rating that Close and high has relationship when the Close is high within end of the day it probabily high of the day attribute"
[1] "Volume is not decided with open or close attribute"
Link to Statistical Inference
Date Open High Low
Length:3383 Min. : 1.076 Min. : 1.109 Min. : 0.9987
Class :character 1st Qu.: 10.422 1st Qu.: 10.825 1st Qu.: 10.2100
Mode :character Median : 16.867 Median : 17.133 Median : 16.6260
Mean : 69.596 Mean : 71.140 Mean : 67.9344
3rd Qu.: 99.818 3rd Qu.:102.411 3rd Qu.: 97.6000
Max. :411.470 Max. :414.497 Max. :405.6667
Close Adj.Close Volume
Min. : 1.053 Min. : 1.053 Min. : 1777500
1st Qu.: 10.544 1st Qu.: 10.544 1st Qu.: 45749250
Median : 16.879 Median : 16.879 Median : 80989500
Mean : 69.578 Mean : 69.578 Mean : 96727173
3rd Qu.: 99.872 3rd Qu.: 99.872 3rd Qu.:123417600
Max. :409.970 Max. :409.970 Max. :914082000
[1] "Summary is used to understand the variables in attributes."
'data.frame': 3383 obs. of 7 variables:
$ Date : chr "2010-06-29" "2010-06-30" "2010-07-01" "2010-07-02" ...
$ Open : num 1.27 1.72 1.67 1.53 1.33 ...
$ High : num 1.67 2.03 1.73 1.54 1.33 ...
$ Low : num 1.17 1.55 1.35 1.25 1.06 ...
$ Close : num 1.59 1.59 1.46 1.28 1.07 ...
$ Adj.Close: num 1.59 1.59 1.46 1.28 1.07 ...
$ Volume : int 281494500 257806500 123282000 77097000 103003500 103825500 115671000 60759000 33037500 40201500 ...
[1] "Structure of the Tesla dataset"
[1] 0
data.Date d1 d2 d3 d4 d5
1 2010-06-29 -0.6764146 -0.6726179 -0.6776776 -0.6735124 2.30299923
2 2010-06-30 -0.6719335 -0.6691196 -0.6737799 -0.6735520 2.00774440
3 2010-07-01 -0.6724549 -0.6720241 -0.6758303 -0.6747871 0.33098788
4 2010-07-02 -0.6737748 -0.6738442 -0.6768859 -0.6766099 -0.24467678
5 2010-07-06 -0.6757547 -0.6758451 -0.6788347 -0.6786507 0.07823015
6 2010-07-07 -0.6781305 -0.6780203 -0.6794099 -0.6788554 0.08847582
[1] "After Normalize the Tesla dataset"
Link to EDA Part-1
data.Date d1 d2 d3 d4 d5
1 2010-06-29 -0.6764146 -0.6726179 -0.6776776 -0.6735124 2.30299923
2 2010-06-30 -0.6719335 -0.6691196 -0.6737799 -0.6735520 2.00774440
3 2010-07-01 -0.6724549 -0.6720241 -0.6758303 -0.6747871 0.33098788
4 2010-07-02 -0.6737748 -0.6738442 -0.6768859 -0.6766099 -0.24467678
5 2010-07-06 -0.6757547 -0.6758451 -0.6788347 -0.6786507 0.07823015
6 2010-07-07 -0.6781305 -0.6780203 -0.6794099 -0.6788554 0.08847582
[1] "Subset for my assumption"
[1] "When the open of the stack is not interested for the people to know the stack rate when above high, but people show interest when the stack is below zero"
[1] "The High of the stack is not interested for the people to know the stack rate when above high, but people show interest when the stack is below average"
Link to EDA Part-2
[1] "The Low of the stack is not interested for the people to know the stack rate when above the average value, but people show interest when the stack is below average"
[1] "The Close of the stack is not interested for the people to know the stack rate when above the average value, but people show interest when the stack is below average"
[1] "The Volume of the stack is interested for the people to know the stack rate when below the average value, but people show interest when the stack is above average"
[1] "When the high of the stock is high then the low of the stack is high, It says that the value of the stock is related to eachother, it is positive correlation, stock is growing high day by day"
[1] "When the high of the stock is high then the Close of the stack is high, It says that the value of the stock is related to eachother, it is positive correlation, stock is growing high day by day and close stack is high"
Link to Introduction
Open High Low Close Volume
1 -0.6764146 -0.6726179 -0.6776776 -0.6735124 2.30299923
2 -0.6719335 -0.6691196 -0.6737799 -0.6735520 2.00774440
3 -0.6724549 -0.6720241 -0.6758303 -0.6747871 0.33098788
4 -0.6737748 -0.6738442 -0.6768859 -0.6766099 -0.24467678
5 -0.6757547 -0.6758451 -0.6788347 -0.6786507 0.07823015
6 -0.6781305 -0.6780203 -0.6794099 -0.6788554 0.08847582
---
title: "Tesla dataset Perform EDA"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: scroll
theme: simplex
social: menu
source_code: embed
---
```{r setup, include=FALSE}
# R markdown Format for Flexible Dashboards
library(flexdashboard)
# Support Functions and Datasets
library(MASS)
#Graphics for R
library(lattice)
#Create Elegant Data Visualizations Using the Grammar of Graphics
library(ggplot2)
library(dplyr)
library(readr)
```
# Introduction
Column {data-width=1000}
-----------------------------------------------------------------------
### Dataset Description
```{r}
"Tesla, Inc. designs, develops, manufactures, leases, and sells electric vehicles, and energy generation and storage systems in the United States, China, and internationally. It operates in two segments, Automotive, and Energy Generation and Storage."
"The company was formerly known as Tesla Motors, Inc. and changed its name to Tesla, Inc. in February 2017. Tesla, Inc. was incorporated in 2003 and is headquartered in Austin, Texas."
"The dataset includes the daily Tesla stock price."
```
### Attach dataset
```{r}
data=read.csv('C:\\Users\\India\\Desktop\\TSLA.csv')
head(data)
```
### Assumption
```{r}
"In tesla share market rating that open and high has relationship when the open is high within end of the day it increase high of the day attribute"
"In tesla share market rating that Close and high has relationship when the Close is high within end of the day it probabily high of the day attribute"
"Volume is not decided with open or close attribute"
```
Link to [Statistical Inference]
# Statistical Inference
Column {data-width=1000}
-----------------------------------------------------------------------
### Summary
```{r}
summary(data)
"Summary is used to understand the variables in attributes."
```
### Structure of the dataset
```{r}
str(data)
"Structure of the Tesla dataset"
```
### Check the data is null or not
```{r}
sum(is.na(data))
d1=scale(data$Open)
d2=scale(data$High)
d3=scale(data$Low)
d4=scale(data$Close)
d5=scale(data$Volume)
subd=data.frame(data$Date,d1,d2,d3,d4,d5)
head(subd)
"After Normalize the Tesla dataset"
```
Link to [EDA Part-1]
# EDA Part-1
Column {data-width=1000}
-----------------------------------------------------------------------
### subset for assumption of my dataset
```{r}
# subset for assumption
subset1=data.frame(subd)
head(subset1)
'Subset for my assumption'
```
### Univariate Analysis
```{r}
#Open Attribute in TSLA dataset
histogram(~subset1$d1,main='Open attribute in tesla',xlab='Open',ylab='Frequency')
'When the open of the stack is not interested for the people to know the stack rate when above high, but people show interest when the stack is below zero'
```
### High Attribute
```{r}
# High Attribute in TSLA dataset
histogram(~subset1$d2,main='High attribute in tesla',xlab='High',ylab='Frequency')
'The High of the stack is not interested for the people to know the stack rate when above high, but people show interest when the stack is below average'
```
Column {data-width=900}
-----------------------------------------------------------------------
Link to [EDA Part-2]
### Low Attribute
```{r}
# Low Attribute in TSLA dataset
histogram(~subset1$d3,main='Low attribute in tesla',xlab='Low',ylab='Frequency')
'The Low of the stack is not interested for the people to know the stack rate when above the average value, but people show interest when the stack is below average'
```
### Close Attribute
```{r}
# Close Attribute in TSLA dataset
histogram(~subset1$d4,main='Close attribute in tesla',xlab='Close',ylab='Frequency')
'The Close of the stack is not interested for the people to know the stack rate when above the average value, but people show interest when the stack is below average'
```
### Volume Attribute
```{r}
# Volume Attribute in TSLA dataset
histogram(~subset1$d5,main='Volume attribute in tesla',xlab='Volume',ylab='Frequency')
'The Volume of the stack is interested for the people to know the stack rate when below the average value, but people show interest when the stack is above average'
```
# EDA Part-2
Column {data-width=1000}
-----------------------------------------------------------------------
### BiVariate Analysis
```{r}
plot(subset1$d2,subset1$d3,col=c(3),main='High vs Low stock',xlab='High stock',ylab='Low stock')
'When the high of the stock is high then the low of the stack is high, It says that the value of the stock is related to eachother, it is positive correlation, stock is growing high day by day'
```
### High Attribute Vs Close Attribute
```{r}
plot(subset1$d2,subset1$d4,col=c(3),main='High vs Close stock',xlab='High stock',ylab='Close stock')
'When the high of the stock is high then the Close of the stack is high, It says that the value of the stock is related to eachother, it is positive correlation, stock is growing high day by day and close stack is high'
```
### High Attribute Vs Volume Attribute
```{r}
plot(subset1$d2,subset1$d5,col=c(3),main='High vs Volume stock',xlab='High stock',ylab='Volume stock')
```
### Low Attribute Vs Close Attribute
```{r}
#
plot(subset1$d3,subset1$d4,col=c(3),main='Low vs Close stock',xlab='Low stock',ylab='Close stock')
```
Column {data-width=900}
-----------------------------------------------------------------------
Link to [Introduction]
### Low Attribute Vs Volume Attribute
```{r}
plot(subset1$d3,subset1$d5,col=c(3),main='Low vs Volume stock',xlab='Low stock',ylab='Volume stock')
```
### Close Attribute Vs Volume Attribute
```{r}
plot(subset1$d4,subset1$d5,col=c(3),main='Close vs Volume stock',xlab='Close stock',ylab='Volume stock')
```
### Multivariate Analysis
```{r}
#heat map
hea=data.frame(subd$d1,subd$d2,subd$d3,subd$d4,subd$d5)
colnames(hea)=c('Open','High','Low','Close','Volume')
head(hea)
he=cor(hea)
levelplot(he,main="Correalation Heatmap of Tesla Attribute",xlab="Attributes",ylab="Attributes")
```