虛擬貨幣分析

擷取2016/01/01到2017/12/20的三個虛擬貨幣資訊 分別是ether,bitcoin,ripple

將三種貨幣的價格作為折線圖資料(合併)

ggplot(my.df, aes(x = x)) +
  geom_line(aes(y = y1)) +
  geom_line(aes(y = y2)) +
  geom_line(aes(y = y3))

因為發現價格差距過大,無法從圖片中看出同時的漲跌狀況,因此改為分開來看

xyplot(x=y1~x ,         
       data=data,     
       panel=function(x,y){  
         panel.fill(col="black")        
         panel.xyplot(x, y)             
         panel.lmline(x, y, col="red")  
       }
       
)

xyplot(x=y2~x ,         
       data=data,     
       panel=function(x,y){  
         panel.fill(col="black")        
         panel.xyplot(x, y)             
         panel.lmline(x, y, col="red")  
       }
       
)

xyplot(x=y3~x ,         
       data=data,     
       panel=function(x,y){  
         panel.fill(col="black")        
         panel.xyplot(x, y)             
         panel.lmline(x, y, col="red")  
       }
       
)

從以上3張圖可以清楚看到在400以前幾乎沒有起伏2017/02/03

因此以下將從400天之後開始分析

x1=data$num[c(400:720)]
y4=data$ether[c(400:720)]
y5=data$bitcoin[c(400:720)]
y6=data$ripple[c(400:720)]
my.df2 <- data.frame(y4,y5,y6)



ggplot(my.df2, aes(x = x1)) +
  geom_line(aes(y = y4)) +
  geom_line(aes(y = y5)) +
  geom_line(aes(y = y6))

xyplot(x=y4~x1 ,         
       data=data,     
       panel=function(x,y){  
         panel.fill(col="black")        
         panel.xyplot(x, y)             
         panel.lmline(x, y, col="red")  
       }
       
)

xyplot(x=y5~x1 ,         
       data=data,     
       panel=function(x,y){  
         panel.fill(col="black")        
         panel.xyplot(x, y)             
         panel.lmline(x, y, col="red")  
       }
       
)

xyplot(x=y6~x1 ,         
       data=data,     
       panel=function(x,y){  
         panel.fill(col="black")        
         panel.xyplot(x, y)             
         panel.lmline(x, y, col="red")  
       }
       
)

後續發展只有ether持續往上漲,其他2個皆有下滑的趨勢

蒐集新聞資料

從Factiva.com 道瓊社及路透社新聞資料庫 關鍵字:china;USA;america 2017年 6/277/16 9/59/14 選擇網路新聞資料

匯入資料並做成文字雲

coin = readLines("remove.txt")
docs = Corpus(VectorSource(coin))
docs <- tm_map(docs, removeWords, stopwords("english"))
a = c("the","com","can","journal","can","morning","china","new","daily","sign","follow","newsletter","good","download","chinese","letter")
docs1<- tm_map(docs, removeWords,a)
docs <- tm_map(docs,removeWords,"shares")
docs <- tm_map(docs,removeWords,"week")
docs <- tm_map(docs,removeWords,"will")
docs <- tm_map(docs,removeWords,"get")
wordcloud(docs1,
          scale=c(5,0.1),min.freq=10,max.words=150,
          random.order=TRUE, random.color=FALSE,
          rot.per=.1, colors=brewer.pal(8, "Dark2"),
          ordered.colors=FALSE,use.r.layout=FALSE,
          fixed.asp=TRUE)
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : daily could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : twitter could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : today could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : amazon could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : week could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : iphone could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : president could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : apple could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : roundup could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : receive could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : important could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : energy could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : company could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : shares could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : jamerson could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : business could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : center could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : prices could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : capital could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : get could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : london could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : please could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : korea could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : bond could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : buy could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : million could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : markets could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : month could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : morgan could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : must could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : earnings could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : ledger could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : trump could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : with could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : exchange could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : financial could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : sign could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : banks could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : feedback could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : risk could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : many could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : borodovsky could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : companies could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : emerging could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : have could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : investors could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : daybreak could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : contact could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : stocks could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : will could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : shot could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : analysis could not be fit on page. It will not be plotted.
## Warning in wordcloud(docs1, scale = c(5, 0.1), min.freq = 10, max.words =
## 150, : market could not be fit on page. It will not be plotted.