Analyzing social media with Python and other tools (4/4)
1. Looking back: Yesterday
Network analysis and visualization
Exercise
Questions?
Hands-on-Workshop
Big (Twitter) Data
Damian Trilling
d.c.trilling@uva.nl
@damian0604
www.damiantrilling.net
Afdeling Communicatiewetenschap
Universiteit van Amsterdam
31 January 2014
9.30
#bigdata
Damian Trilling
2. Looking back: Yesterday
Network analysis and visualization
Exercise
Questions?
In this session (4/4):
1 Looking back: Yesterday
2 Network analysis and visualization
Network analysis?
Preparing the data
Gephi
3 Exercise
4 Questions?
#bigdata
Damian Trilling
3. Looking back: Yesterday
Network analysis and visualization
Exercise
Questions?
Yesterday
We did a lot of stuff. . .
• Future plans?
• What do you still need?
• Don’t forget to have a look at the sample script (maybe copy
the whole beehub-folder)
#bigdata
Damian Trilling
4. Looking back: Yesterday
Network analysis and visualization
Exercise
Questions?
Network analysis?
Network analysis?
Why?
• Often used to visualize social media data
• But you can also calculate a lot of interesting statistics
• Today: No intro to network analysis as a method, but first
steps to get the data and software working
#bigdata
Damian Trilling
5. Looking back: Yesterday
Network analysis and visualization
Exercise
Questions?
Preparing the data
Network analysis and visualization:
Preparing the data
#bigdata
Damian Trilling
6. Looking back: Yesterday
Network analysis and visualization
Exercise
Questions?
Preparing the data
Twitter networks
Types of networks we could analyze
• RT-networks
• @mention-networks
• Follower-following-networks
• ...
#bigdata
Damian Trilling
7. Looking back: Yesterday
Network analysis and visualization
Exercise
Questions?
Preparing the data
Twitter networks
Think of the CSV-files from yesterday
#bigdata
Damian Trilling
8. Looking back: Yesterday
Network analysis and visualization
Exercise
Questions?
Preparing the data
Twitter networks
Think of the CSV-files from yesterday
• We could strip everything from the tweet-column except the
username (if someone is mentioned) . . .
#bigdata
Damian Trilling
9. Looking back: Yesterday
Network analysis and visualization
Exercise
Questions?
Preparing the data
Twitter networks
Think of the CSV-files from yesterday
• We could strip everything from the tweet-column except the
username (if someone is mentioned) . . .
• and then get a directed network: a column with senders and a
column with the user the sender addresses.
#bigdata
Damian Trilling
10. Looking back: Yesterday
Network analysis and visualization
Exercise
Questions?
Preparing the data
Twitter networks
Think of the CSV-files from yesterday
• We could strip everything from the tweet-column except the
username (if someone is mentioned) . . .
• and then get a directed network: a column with senders and a
column with the user the sender addresses.
• Countless variations possible
#bigdata
Damian Trilling
11. Looking back: Yesterday
Network analysis and visualization
Exercise
Questions?
Preparing the data
Twitter networks
Useful ressources:
• http://dfreelon.org/t2g/t2g.py: Twitter-to-Gephi
converter by Dan Freelon (but hey, with your knowledge from
yesterday you could have written that one yourself!)
• http://mappingonlinepublics.net/resources/: Axel
Bruns’ processing tools for your Twapperkeeper-data
#bigdata
Damian Trilling
12. Looking back: Yesterday
Network analysis and visualization
Exercise
Questions?
Preparing the data
Twitter networks
Useful ressources:
• http://dfreelon.org/t2g/t2g.py: Twitter-to-Gephi
converter by Dan Freelon (but hey, with your knowledge from
yesterday you could have written that one yourself!)
• . . . and indeed, there is an improved version on beehub.
• http://mappingonlinepublics.net/resources/: Axel
Bruns’ processing tools for your Twapperkeeper-data
#bigdata
Damian Trilling
13. Looking back: Yesterday
Network analysis and visualization
Exercise
Questions?
Preparing the data
Facebook-networks
Gephi-networkfiles you can get from netvizz
• personal network – extracts your friends and the friendship
connections between them
• personal like network – creates a network that combines your
friends and the objects they liked
• group data – creates networks and tabular files for both
friendships and interactions in groups
• page like network – creates a network of pages connected
through the likes between them
• page data – creates networks and tabular files for pages
#bigdata
Damian Trilling
14. Looking back: Yesterday
Network analysis and visualization
Exercise
Questions?
Gephi
Network analysis and visualization:
Gephi
#bigdata
Damian Trilling
18. Looking back: Yesterday
Network analysis and visualization
Exercise
Questions?
Make your own network visualiztion
Steps to take
1
2
Open the file in gephi. Pay attention to the correct options
(directed vs undirected network).
3
#bigdata
Collect a Facebook-network with netvizz OR use the
Python-script to extract a network from one of yesterday’s
Tweet-datasets. It would be even more elegant, of course, to
integrate the code in your script from yesterday, so that it also
produces a gephi output file.
Visualize + calculate interesting statistics.
Damian Trilling
19. Looking back: Yesterday
Network analysis and visualization
Exercise
Questions?
Recap
1 Looking back: Yesterday
2 Network analysis and visualization
Network analysis?
Preparing the data
Gephi
3 Exercise
4 Questions?
#bigdata
Damian Trilling