# Some experiments in R to handle twitter profile data
# Ian Hopkinson 2013-03-28

# First we get the data in JSON format and then convert to a data.frame
library(rjson)
TwitterRecordsFile = 'http://box.scraperwiki.com/bdaw7xa/a6e8e71d96b2449/sql?q=select+*+from+twitter_followers'
TwitterRecords = fromJSON(file=TwitterRecordsFile, method='C')
Twitterdf=data.frame(t(sapply(TwitterRecords,c)))
# smoothScatter is in base R
smoothScatter(Twitterdf$followers_count,Twitterdf$following_count,xlim=c(0,5000),ylim=c(0,5000),main="Followers vs following count for a subset of twitter users")
