Visualize your Twitter network


Published on

Hands on guide to a quick visualization of a Twitter hashtag network.

EDIT: NodeXL is no longer available for free

Published in: Data & Analytics, Technology
No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Visualize your Twitter network

  1. 1. Simple Twitter network analysis using NodeXL and Gephi Olli Parviainen Verkostoanatomia 050 380 6739 [email_address]
  2. 2. Olli Parviainen Verkostoanatomia twitter: jattipaa blog: [email_address]
  3. 3. First things first <ul><li>This presentation is an example on how to create your first Twitter network analysis. I don’t go deep in the network analysis side: using this you can create a basic visualization of a search term network. </li></ul><ul><li>First, load gephi ( from Gephi is used to visualize, manipulate and analyze networks. It's a very powerful (and cool tool) that has a active developing community. </li></ul><ul><li>Then, download NodeXL ( &quot;NodeXL is a free, open-source template for Excel 2007 and 2010 that lets you enter a network edge list, click a button, and see the network graph, all in the Excel window.&quot; </li></ul><ul><li>In short, NodeXL uses your Office 2007 to pretty much the same things as Gephi does but with Excel. We will use NodeXL to import data from Twitter. The reason why I use Gephi is the efficiency and for the more visually appeasing graphs it produces. Feel free to NodeXL, it's also a excellent tool. </li></ul>
  4. 4. Importing tweets 1/3 <ul><li>Open NodeXL and choose NodeXL from the ribbon </li></ul><ul><li>Select import – From Twitter Search Network </li></ul><ul><li>Feel free to try the other search types. They are slower (can take hours depending on the network size) and using Twitter during the sweep can cancel your run </li></ul>
  5. 5. Importing tweets 2/3 <ul><li>Now we can choose a keyword. The keyword can be a word or a hashtag and you can use Twitter’s search operators finding it </li></ul>
  6. 6. Importing tweets 3/3 <ul><li>Choose your keyword and check all but the ”Follows relationship” (slows things down) in the ”Add an edge for each ” boxes </li></ul><ul><li>Uncheck the ”Limit to ” box (unless you checked the ”Follows relationship”, it might be handy) </li></ul>Note: I recommed also checking the ”I have authorized NodeXL – ” box. It speeds things up and I have never had any problems with it
  7. 7. Exporting tweets <ul><li>NodeXL has graph visualization properties but I let you explore them yourself </li></ul><ul><li>Choose ”Export to GraphML file...” and click yes on the dialog box </li></ul><ul><li>Open your Gephi (and update it from Tools -> Plugins -> Updates | Available plugins) </li></ul>
  8. 8. Using Gephi – quick overview <ul><li>In Gephi you have basically 3 different tabs to analyze and manipulate your graphs </li></ul><ul><li>In ”Overview” you can manipulate and analyze the graph </li></ul><ul><li>In ”Data laboratory” you can sort and review your data </li></ul><ul><li>In ”Preview” you can fine tune your visualization </li></ul>
  9. 9. Using Gephi – importing networks <ul><li>Select File –> Open -> file.graphml </li></ul><ul><li>The network is directed meaning that the direction of the mention, RT etc. matters. Facebook friend-relationship is an example of an undirected network </li></ul><ul><li>The boxes that should be unchecked are: Append graph* and Time frame** </li></ul>* If you want to join networks together, use this one ** Creates a dynamic network, example:
  10. 10. Using Gephi – arranging your nodes <ul><li>Select Layout tab on the Overview mode and click on the Force Atlas –layout </li></ul><ul><li>Set Repulsion at 20000, Attraction strength at 50, Maximum displacement 1, Uncheck Autostabilize function, set Gravity at 80, Check Adjust by sizes and set Speed at 5 </li></ul>* These settings provide a nice arrangement when using 10-1000 node networks. Feel free to try out different options
  11. 11. Using Gephi – filtering data 1/2 <ul><li>To speed things up (the previous settings might take a while to run) let’s filter out those nodes that didn’t mention anyone ore didn’t receive mentions or RT’s </li></ul><ul><li>Click Average degree is the Statistics tab (it counts the amount of mentions given/ recieved) </li></ul><ul><li>We will use this information to choose who to filter out </li></ul>
  12. 12. Using Gephi – filtering data 2/2 <ul><li>Choose the Filters tab </li></ul><ul><li>Click Attributes – Range and drag the Degree text to the Queries window below </li></ul><ul><li>Use the slider to remove all of those without any connections: set degree range to start with 1 </li></ul><ul><li>Now use the Force Atlas again </li></ul>
  13. 13. Using Gephi – visualizing your data: communities <ul><li>After the nodes have settled it’s time to make sense of it all </li></ul><ul><li>To detect communities, hit the modularity Statistics button </li></ul><ul><li>Then choose Nodes on the Partition tab and hit refresh </li></ul><ul><li>Choose Modularity class and assign color to the different communities </li></ul>
  14. 14. Using Gephi – visualizing your data: nodes <ul><li>Choose nodes on the Ranking tab and select Indegree </li></ul><ul><li>We want to change the size of the nodes so select the diamond shape in the highlighted area </li></ul><ul><li>Set Min Size to 5 and Max Size to 100 and hit Apply </li></ul><ul><li>The size of the node now represents the amount of mentions </li></ul><ul><li>Outdegree would represent the times the Twitter user mentioned others </li></ul>Add excel to the fun: rank and export the nodes in Data laboratory: who is the most active tweeter etc.
  15. 15. Using Gephi – visualizing your data: labels <ul><li>Make the node labels visible from the ”T”-symbol </li></ul><ul><li>We want to make the label size to match the node size so choose Node size from the black ”A” symbol </li></ul><ul><li>To prevent the nodes from overlapping choose Label adjust from the Layout tab </li></ul><ul><li>You can drag the nodes with the Hand symbol </li></ul>
  16. 16. Using Gephi – final touches <ul><li>Select the Preview window </li></ul><ul><li>In the Node subsection in the Preview settings -tab check the Show labels box </li></ul><ul><li>Export to PDF from bottom left corner </li></ul><ul><li>In the export window choose Options and change the Orientation to Landscape </li></ul><ul><li>Add an inch to the left and right Margin to prevent cutting out longer labels </li></ul>You can also take a screenshot in the Overview window using the Camera symbol
  17. 17. Last step: impress your friends, co-workers and relatives
  18. 18. Olli Parviainen Verkostoanatomia twitter: jattipaa blog: [email_address]