R twitteR Analysis: How HOT is the Lynas Rare Earths Mining Malaysia?

February 25, 2012

(This article was first published on CloudStat, and kindly contributed to R-bloggers)

Since Lynas Malaysia Corporation, Australia Rare Earth Refiner Granted Malaysia License, it is always a very hot topic. This can be proven through the daily tweets across recent 7 days. This chart was built by Tweets Keyword Trending Application @ http://www.cloudstat.org/index.php?do=/kaichew/blog/tweets-keyword-trending-application/


> xA
[1]  300  293  359  860 1167 1488 1490

Source code:

y <-“lynas”



s0 <- searchTwitter(y, n, since=as.character(Sys.Date()))
x0 <- length(s0)

s1 <- searchTwitter(y, n, since=as.character(Sys.Date()-1), until=as.character(Sys.Date()))
x1 <- length(s1)

s2 <- searchTwitter(y, n, since=as.character(Sys.Date()-2), until=as.character(Sys.Date()-1))
x2 <- length(s2)

s3 <- searchTwitter(y, n, since=as.character(Sys.Date()-3), until=as.character(Sys.Date()-2))
x3 <- length(s3)

s4 <- searchTwitter(y, n, since=as.character(Sys.Date()-4), until=as.character(Sys.Date()-3))
x4 <- length(s4)

s5 <- searchTwitter(y, n, since=as.character(Sys.Date()-5), until=as.character(Sys.Date()-4))
x5 <- length(s5)

s6 <- searchTwitter(y, n, since=as.character(Sys.Date()-6), until=as.character(Sys.Date()-5))
x6 <- length(s6)

xA <- c(x6, x5, x4, x3, x2, x1, x0)

df.bar <- barplot(xA)

barplot(xA, main=”How Hot is Lynas Recently?”, xlab=”Days”, 
   ylab=”Total”, names.arg=c(“Yes6”,”Yes5”,”Yes4”,”Yes3”,”Yes2”,”Yes1”,”Today”),
   border=”blue”, density=c(10,20,30,40,50,60,70))
lines(x = df.bar, y = xA, col=”red”)
points(x = df.bar, y = xA, col=”yellow”)

Last but not least. Save Malaysia, Stop Lynas!

To leave a comment for the author, please follow the link and comment on their blog: CloudStat.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: , , , ,

Comments are closed.


Mango solutions

RStudio homepage

Zero Inflated Models and Generalized Linear Mixed Models with R

Quantide: statistical consulting and training



CRC R books series

Contact us if you wish to help support R-bloggers, and place your banner here.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)