Lab11 Collect and Visualize Twitter Social Network in Gephi V2
Channel: LBSocial
Date: 2023-05-01

Objectives:
• Get familiar with Gephi
• Learn how to collect Twitter data with Gephi
• Learn how to visualize social networks in Gephi 

Data: 
• Download Tweets with the Twitter Streaming Importer Plugin in Gephi

Steps:
1. If you don't have Gephi, you can download and install Gephi from https://gephi.org/. You also need to have JDK installed first to run Gephi. Download JDK from https://aws.amazon.com/corretto. 
2. Open Gephi/ Tools/ Plugins, search, and install the Twitter Streaming Importer V2 and the Circular Layout plugins. You need to restart Gephi.
 3. Start a new project to create an un-directed hashtag network
3.1. In the Credentials, fill in the Twitter token. The token is posted on Canvas.
 3.2. Define a rule that the returned tweets contain the keyword election and have hashtags. 
 3.3. Add that rule.
 3.4. Select the Hashtag Network to Start.   3.5. Stop when you have more than 50 nodes. 
 3.6. Calculate the Average Degree and the Connected Components. 
 3.7. Choose the Circular Layout and order by the Component ID
 • The node colors represent the ID of the Connected Component
 • Node sizes represent the Degree
 • Run the Layout, and adjust the Layout if necessary. For example, you can use Expansion and Label Adjust. 
3.8. Optional: Enable Timeline to view the network over time
 3.9. In the preview window, adjust the labels' size and the edges' thickness. 
3.10. Export the image as a PNG file. 
4. Optional: Start a new project to create a directed user network
4.1. Define a rule that Twitter users are in VA. 
 4.2. Delete the previous rule and add the new rule.
 4.3. Select the User Network to Start.  
 4.4. Stop when you have more than 50 nodes. 
 4.5. Calculate the Eigenvector Centrality and the Connected Components. 
 4.6. Choose the Circular Layout and order by the Component ID
• The node colors indicate the ID of the Connected Component
• Node sizes represent the Eigenvector Centrality
 4.7. Run the Layout, and adjust the Layout if necessary. For example, you can use Expansion and Label Adjust.
4.8. In the preview window, adjust the labels' size and the edges' thickness. 
4.9. Make sure the preset is Default Straight
 4.10. Export the image as a PNG file.