Analysing Google Plus posts using R language #rstats

Here is a short post in retrieving information from the Google+ API using R, and then analysing it.

To create an API key:

  1. Go to the Google Developers Console.
  2. Create or select a project.
  3. In the sidebar on the left, select APIs & auth.
  4. In the displayed list of APIs, find the Google+ API and set its status to ON.
  5. In the sidebar on the left, select Credentials.
  6. Create an API key by clicking Create New Key. Select the appropriate kind of key: Server key  Then clickCreate.

from- https://developers.google.com/+/api/oauth

and the R code

#install.packages("plusser")
library(plusser)
help(plusser)
library(RCurl)
options(RCurlOptions = list(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl")))
setAPIkey('AIzaSyBtYqDsAtzp4FOS7FGbrc_n6mD-uJIOvcQ')
myProfile=harvestProfile("+AjayOhri", parseFun = parseProfile)
str(myProfile)
myposts=harvestPage("+AjayOhri", parseFun = parsePost, results = 1, nextToken = NULL, cr = 1)
str(myposts)
head(myposts)
plot(myposts$ti,myposts$nC) #number of comments
plot(myposts$ti,myposts$nP) #number of likes or plus 1
plot(myposts$ti,myposts$nR) #number of reshares

some screenshots and images Screenshot 2014-06-26 13.33.08

Screenshot 2014-06-26 13.32.56

You can also see the Rpubs document here http://rpubs.com/decisionstats2/plusser Now you can do text analysis and sentiment analysis on myposts$msg and do social media analysis on what makes people like what kind of content. 


For better results, use a google plus id (page or person) which has a lot of PUBLIC posts!

 

ggvis is awesomeness personified #rstats

 

Hu ha! Latest sexy software from our man Dr Hadley Wickham and his ninjas at RStudio. Now YOU can make a Business Intelligence software for FREE. How good is it? time will tell if someone can use it to give Tableau Software and Qlikview a run for the money

Seriously- I would like to see ONE implementation of RHadoop and Shiny with ggplot2 and d3

(Big data analytics indeed 😉 )

from

———————————-

http://ggvis.rstudio.com/

ggvis is a data visualization package for R which lets you:

  • Declaratively describe data graphics with a syntax similar in spirit to ggplot2.
  • Create rich interactive graphics that you can play with locally in Rstudio or in your browser.
  • Leverage shiny’s infrastructure to publish interactive graphics usable from any browser (either within your company or to the world).

The goal is to combine the best of R (e.g. every modelling function you can imagine) and the best of the web (everyone has a web browser). Data manipulation and transformation are done in R, and the graphics are rendered in a web browser, using Vega. For RStudio users, ggvis graphics display in a viewer panel, which is possible because RStudio is a web browser.

Please note that the API has changed significantly between ggvis 0.1 and 0.3. Documentation for the old version is here.

Screenshot 2014-06-25 21.07.50

Great Way to learn Git easily

a great way to learn Git easily is here https://try.github.io/

Screenshot 2014-06-24 19.23.59

This is a much better designed code school project than the one for R

http://tryr.codeschool.com/

However Swirl is a great way to learn  R in an interactive way. its only drawback is it needs to be integrated with something like http://www.r-fiddle.org/#/ for a true automated browser only version

Why do I favor automated elearning solutions now? Because teaching the same thing again and again can be boring for the teacher and videos can be boring for the students. Note how the potential student is given positive reinforcement to boost his morale, something any good teacher know.

The Superpower Doctrine

  1. Superpowers have super citizens. Killing their citizens starts wars. Inviting those citizens for trade and travel leads to prosperity.
  2. The dominant culture on the planet in terms of literature, language, and entertainment belongs to the Superpower.
  3. You cannot be a new Superpower unless you defeat or distract or corrupt the old Superpower. At the very minimum the transition is fraught with both competition and cooperation
  4. Superpowers provide the elite of their own citizenry with enviable lifestyles as well as freedom to speak and act (atleast in private).
  5. The richest country in the world is always a target. The most militarized country will always go broke. You become a superpower only when you can keep the balance.
  6. Superpowers have allies. Their enemies are divided more than their allies.
  7. History of a nation and a race can be used for predictive analytics about the future

Based on – the literary and strategic classic

 

There is more to open source statistics than R #rstats

There is more to open source statistics than R   and other things your Professor never told you

There is a disturbing trend I see in members of R Community particularly in its evangelical wing, in claiming R is the panacea and cure for all things statistical. No one software can and will be able to handle all the parts of the data analytics pipeline equally well, there will always be trade-offs based on perceptual assessments of both current needs and future trends.

While an employee of a proprietary software company can and will always claim that his software is the best and fastest for everything, what has happened over the past few years is that  analytics open source software people have been neatly split into Pythonistas and R Users.

This is a disturbing trend. Rather than mimick and copy libraries and packages between R and Python, there should be a movement for greater inter-operability and transparency in cross training. Why cant you teach Pandas in a R Meetup and Why cant you learn ggplot2 in a Python meetup.

United we stand and both R and Python communities will gain. Divided, the opponents of open source will end up appropriating the work of the community and laugh all the way to the bank.

More R and More Python. Like Rum with Cola. Not Seperately, but together. Is that a pipe dream, or will that benefit industry? I would love to see atleast one big startup making products and services in both!