twitterAnomalyDetect: Anomaly Detection of Tweets on certain Topic

Description Usage Arguments Details Examples

View source: R/TwitterSentimentAnalysis.R

Description

When do people tweet? Anomaly Detection of Tweets on certain Topic.

Usage

1
2
twitterAnomalyDetect(tweets, lastDay = Sys.Date(), title = "AUD/USD",
  alpha = 0.5, fontsize = 10)

Arguments

tweets

a list of corpus and data.frame of tweets retreived from tweet_corpus_chunck() or tweet_corpus{}

lastDay

last date of the analysis

title

title to be added to the results plots

alpha

opacity 0.5 default

fontsize

font size

Details

Please use RQuantAPI for twitter data retrieval

Examples

1
2
3
4
5
6
7
setupTwitterConn()
tweets <- tweet_corpus_chunck(search = "aud+usd", n = 50000, chunck_size = 7, total_size = 90, until = Sys.Date())
saveRDS(tweets, '~/analytics/Workspace/Tweets.RDS')
tweets = readRDS('~/analytics/Workspace/Tweets.RDS')
anomalies <- twitterAnomalyDetect(tweets, lastDay = Sys.Date(), title = "AUD/USD")
anomalies$tweetsDistribution
anomalies$anomalies

ivanliu1989/RQuantTrader documentation built on Sept. 13, 2019, 11:54 a.m.