Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions 03-cleaning.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,19 @@ for (i in 16:nrow(USDT)){

## Combine All the Value into One table

Finally, we combine the volatility, return, and market capitalization with the df.close1, creating the final table df.cryto
Finally, we combine the volatility, return, and market capitalization and volume with the df.close1, creating the final table df.crpyto

```{r}
df.close1$Date<-rep(df.close$Date,5)
df.cryto<-
df.crypto<-
cbind(df.close1,
market_cap=c(BTC$market_cap,BNB$market_cap,ETH$market_cap,
USDC$market_cap,USDT$market_cap),
return=c(BTC$Return,BNB$Return,ETH$Return,USDC$Return,USDT$Return),
volatility=c(BTC$Vol,BNB$Vol,ETH$Vol,USDC$Vol,USDT$Vol))

volatility=c(BTC$Vol,BNB$Vol,ETH$Vol,USDC$Vol,USDT$Vol),
volume=c(BTC$total_volume,BNB$total_volume,ETH$total_volume,
USDC$total_volume,USDT$total_volume))
df.crypto$Date<-as.Date(df.crypto$Date)
```


4 changes: 2 additions & 2 deletions 04-missing.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ library(redav)
```

```{r}
plot_missing(df.cryto)
plot_missing(df.crpyto)
```

Observed that volatility and return contains missing values. Take a look into number of missing value in columns we found:

```{r}
colSums(is.na(df.cryto)) %>%
colSums(is.na(df.crypto)) %>%
sort(decreasing = TRUE)
```

Expand Down
25 changes: 25 additions & 0 deletions 05-results.Rmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Results

```{r}
ggplot(df.close1, aes(price)) +
geom_boxplot() + coord_flip() +
Expand All @@ -11,3 +12,27 @@ ggplot(df.close1, aes(price)) +
plot(df.close[,2:6],pch=20, cex=0.1)
```

```{r}
## plot volatility by crypto
ggplot(df.crypto, aes(x=Date,y=volatility))+
geom_line()+
facet_wrap(~cryptocurrency,scales = "free")


```

```{r}
## plot volatility vs market capitalization
ggplot(df.crypto, aes(x=market_cap,y=volatility))+
geom_point(pch=5, cex=0.2)+
facet_wrap(~cryptocurrency, scales = "free")
```
```{r}
ggplot(rbind(df.crypto[df.crypto$cryptocurrency=="USDC",],
df.crypto[df.crypto$cryptocurrency=="USDT",]),
aes(Date, volume)) + geom_col()+
facet_wrap(~cryptocurrency,scales="free")
```