Welcome!

Web 2.0 Authors: Liz McMillan, Dana Gardner, Mike Hicks, Carmen Gonzalez, Brian Vandegrift

Blog Feed Post

Political revolutions on Twitter, visualized with R

Twitter has become a powerful medium for organizing and communicating with factions during popular uprisings: the crisis in Egypt, the uprising in Syria, the revolution in Iran, and other conflicts all around the world. Twitter's effectiveness relies on its ability for the various factions to self-organize and to fight the information battle in social media. Esteban Moro Egido, a mathematics professor at Universidad Carlos III in Madrid, puts this battle into stark relief with a video depicting Twitter activity around Spain's general strike in March this year. Esteban has used the R language for years to understand complex networks with applications in areas such as telecommunications and social media, and has put those skills to great use analyzing all of the tweets, retweets and mentions related to the strike. Here's the video:   Each point in the animation represents a twitter user, each colour-coded according to their faction in the debate (pro-strike, anti-strike, or somewhere in between). He used community-finiding algorithms to automatically assign Twitter users to factions, and Esteban described the factions in an email: The communities where identified using one of the community-finding algorithms in R. Specifically the walk trap algorithm run over the static graph of (weighted) RT graph between twitter accounts. So each Twitter account is assigned to a particular community right from the beginning.  What we did afterwards was to check what these communities were talking about (tweets and RTs). We found that the tweets and RTs in the orange community were in favor of the general strike and the reasons behind it, while the tweets and RTs in the dark blue community were against the unions and the reasons behind the general strike. It is interesting to see that the communities found in the structural analysis of the RT graph also correspond to opinion communities, the reason being that there are not many RTs between groups which have such different opinions.   There are other two communities in the video (light blue and green) which correspond to news media and, a bot network automatically tweeting about the general strike. The animation itself was created entirely with R using the igraph package, and encoded to video using ffmpeg. You can create similar videos yourself for other dynamic political discussions on Twitter: Esteban has kindly provided a tutorial on how to create such animations, with R code.  Implicit None: Temporal network of information diffusion in Twitter  

Read the original blog entry...

More Stories By David Smith

David Smith is Vice President of Marketing and Community at Revolution Analytics. He has a long history with the R and statistics communities. After graduating with a degree in Statistics from the University of Adelaide, South Australia, he spent four years researching statistical methodology at Lancaster University in the United Kingdom, where he also developed a number of packages for the S-PLUS statistical modeling environment. He continued his association with S-PLUS at Insightful (now TIBCO Spotfire) overseeing the product management of S-PLUS and other statistical and data mining products.<

David smith is the co-author (with Bill Venables) of the popular tutorial manual, An Introduction to R, and one of the originating developers of the ESS: Emacs Speaks Statistics project. Today, he leads marketing for REvolution R, supports R communities worldwide, and is responsible for the Revolutions blog. Prior to joining Revolution Analytics, he served as vice president of product management at Zynchros, Inc. Follow him on twitter at @RevoDavid