diff --git a/Rplot1.png b/Rplot1.png new file mode 100644 index 0000000..c0588fc Binary files /dev/null and b/Rplot1.png differ diff --git a/Twitter search code.Rmd b/Twitter search code.Rmd index f46c9e2..512c367 100644 --- a/Twitter search code.Rmd +++ b/Twitter search code.Rmd @@ -1,35 +1,35 @@ ---- -title: "HUDK5053 - Twitter" -author: "Charles Lang" -date: "September 19, 2016" -output: html_document ---- - -```{r} -library(ROAuth) -library(twitteR) - -api_key <- - -api_secret <- - -access_token <- - -access_token_secret <- - -setup_twitter_oauth(api_key, api_secret, access_token, access_token_secret) -``` - -#Download Tweets -```{r} -TL <- searchTwitter("educational data mining", n=50, since='2017-10-01', until='2016-10-08') -TL <- do.call("rbind", lapply(TL, as.data.frame)) -``` - -```{r} -counts=table(TL$screenName) -barplot(counts, las=2) - -#By time of day -hist(TL$created, breaks = "d") -``` +--- +title: "HUDK5053 - Twitter" +author: "Charles Lang" +date: "September 19, 2016" +output: html_document +--- + +```{r} +library(ROAuth) +library(twitteR) + +api_key <- "6bd9o3Jtos413E620dtQcnaUq" + +api_secret <- "fkA88iPSDBoMDiZfRI4bUmLdug9RBYBIOTiIZ9cdpdY9TvRLBM" + +access_token <- "95831171-q3bMDuXueoPncMwiSDlmh8xfmfuyvWU9rCS60X9VQ" + +access_token_secret <- "7tyGqiyJ4CXTsU2e92N6sXyQ4YuHi9EbIrnNCIIsWntE8" + +setup_twitter_oauth(api_key, api_secret, access_token, access_token_secret) +``` + +#Download Tweets +```{r} +TL <- searchTwitter("educational data mining", n=50, since='2017-10-01', until='2017-10-08') +TL <- do.call("rbind", lapply(TL, as.data.frame)) +``` + +```{r} +counts=table(TL$screenName) +barplot(counts, las=2) + +#By time of day +hist(TL$created, breaks = "d", col = "579") +```