Social Network Analysis and Visualization
Goal: Learn something about our social connections here at the Science Hack Day by analyzing and visualizing the Twitter network of SHD participants.
- Ellen König
- Tom Beutin
- Syennie Valeria
- Software (Python)
HOW WE BUILT IT
jupyterfor running the notebooks
python-twitterfor accessing the Twitter API
networkxfor Social network and graph analysis
matplotlibfor basic graph visualization
audiolazyfor the sound “visualization”
From the Twitter API, we fetched the follower lists for the most recent tweeters using the #shdb17 hashtag and the science hack day attendee twitter list curated by the orga team at https://twitter.com/SHD_Berlin/lists/shd-berlin-2017.
Due to the strict API rate limiting on Twitter’s side, we had to run the data collection over night and pause whenever the rate limit was exceeded (the API library we used offers that as a setting).
We then feed the follower lists into the NetworkX library to create a graph, draw a basic network visualization and compute some per-node social network metrics (betweenness, closeness, in_degree_centrality, out_degree_centrality). The graph was limited to only include follower links between the attendees, ignoring all other followers,
As a last step, we used the computed 4 metrics per attendee to iterate over the graph and turn each tweeter into a sound. We varied the following sound parameters based on the metrics
- Pitch: Closeness
- Length: In_degree
- Volume: Out_degree
- Pause: Betweeness
To make the result a bit more pleasant sounding, the pitches were mapped only on sounds from the pentatonic scale.
- Final graph: https://github.com/ellenkoenig/we-are-not-alone/blob/master/complete_graph_circular.pdf