Using LostCircles’ Graphml files with NodeXL

LostCircles (https://lostcircles.com/) uses a proprietary format that NodeXL fails to open and use.

Below is a workaround for this problem and a step by step approach to charting your Facebook network of friends:

  1. Open the “Graphml (No Pics)” file downloaded from LostCircles
  2. Find the <node id=”n0″> tag and delete all the text that precedes it
  3. Copy and paste the text below before the  <node id=”n0″> tag:
<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns">
<key attr.name="label" attr.type="string" for="node" id="label"/>
<key attr.name="Edge Label" attr.type="string" for="edge" id="edgelabel"/>
<key attr.name="weight" attr.type="double" for="edge" id="weight"/>
<key attr.name="r" attr.type="int" for="node" id="r"/>
<key attr.name="g" attr.type="int" for="node" id="g"/>
<key attr.name="b" attr.type="int" for="node" id="b"/>
<key attr.name="x" attr.type="float" for="node" id="x"/>
<key attr.name="y" attr.type="float" for="node" id="y"/>
<key attr.name="size" attr.type="float" for="node" id="size"/>
<key attr.name="id" attr.type="string" for="node" id="d0"/>
<key attr.name="name" attr.type="string" for="node" id="d1"/>
<key attr.name="userName" attr.type="string" for="node" id="d2"/>
<key attr.name="profile" attr.type="string" for="node" id="d3"/>
<key attr.name="dataUrl" attr.type="string" for="node" id="d4"/>
<graph edgedefault="undirected">
  1. Save the file or Save it As a new GraphML file
  2. Open NodeXL and “import from GraphML file”
  3. Group by cluster and put all neighborless vertices in one group
  4. Go to the Vertices sheet
  5. The URL in the Label column is the same as the URL in the profile column (redundant information that you can replace). Change the format of the Label column from Text to General to allow the insertion of formulas (otherwise, your formulas will appear as text and will not be calculated)
  6. Delete all values in the Labels column (enter the first cell, then ctrl+space and delete)
  7. Type =[@name] in the first cell of the Labels column. It should automatically replicate to all the rows
  8. In the graph pane, choose the Harel-Koren Fast Multiscale graph style
  9. From the same dropdown, go to the Layout options and Lay out each group in its own box
  10. Draw the graph – If you have a few hundred friends on Facebook, fairly distributed in groups (family, colleagues, beer buddies, etc.), the layout should be good enough
  11. Calculate all graph metrics
  12. Autofill Columns with Vertex Size linked to Degree with vertex size options ranging from 1 (smallest) to 50 (largest)
  13. Sort the vertices by Degree
  14. Set the label position of vertices 50+ to “nowhere” to hide the least connected friends
  15. A good practice would be to set the tooltip to the username in order to see the names when you hover over a vertex

 

 

 

 

Facebooktwitter Facebooktwitter

Showing Bridging Nodes Only in NodeXL

Bridges (edges) and bridging nodes (vertices) in a network are essential in connecting cliques, moderating the debate and introducing new ideas and innovations and filling structural holes in a network (ref. Ronald S. Burt).

 

When you separate vertices in groups in NodeXL (figure), several columns are added to your “edges” sheet, mainly “Vertex 1 Group” and “Vertex 2 Group”

Refreshing the graph using the “lay out each of the graph’s groups in its own box” (figure)

return a graph where nodes/vertices are separated into groups, each painted in a different color:

Finding edges with high centrality or degree is straightforward in NodeXL but, what if you wanted to find the bridges between groups? people who are transporting/propagating the debate/discussion from one clique to the other?

First, we need to determine the bridging edges between groups:

  • In the Edges vertices, add a column “Bridging” and type the following formula: =IF([@[Vertex 1 Group]]<>[@[Vertex 2 Group]],1,0). This formula should return 1 if the the group of Vertex 1 is different from the group of Vertex 2 (“vertex 1 group” and “vertex 2 group” columns)
  • Hide the edges that do not traverse groups but adding the following formula in the “visibility” column in the “edges” sheet: =IF([@Bridging]=1,”Show”,”Hide”)

If you refresh the graph now, it should look like this:

It is still confusing but most edges have disappeared. Next step is to hide the vertices that are no longer connected to any other vertex (technically, the vertices that do not bridge with other vertices in other groups or cliques):

In the “Vertices” sheet, add a new column, “bridge”. We need to count/sum all the bridging edges where this vertex is connected (left or right). The formula to add in the “bridge” column is: =SUMIF(Edges[Vertex 1],[@Vertex],Edges[Bridging])+SUMIF(Edges[Vertex 2],[@Vertex],Edges[Bridging])

the formula in simple English: Sum the values in the Bridging column only if  the Vertex 1 column in the Edges table contains the name of the current vertex. Do the same if the name of the current vertex is in the vertex 2 column.

A value of zero means that the vertex is not a bridging node. The higher the value, the higher the number of connections of this vertex to people outside its group or circle of friends:

The last step is to hide the non-bridging vertices. In the Visibility column of the vertices sheet, type the following formula: =IF([@Bridge]=0,”Hide”,”Show”)

You can also use “Skip” instead of “Hide” to exclude the non-bridging vertices from future calculations (need recalculation).

To display the names of the vertices, in the “Label” column, type =[@Vertex]

In the image below, for aesthetic purposes, I hid all the bridging nodes that have less than ten connections with other groups (=IF([@Bridge]<10,”Hide”,”Show”) in the Visibility column of the vertices sheet instead of =IF([@Bridge]=0,”Hide”,”Show”):

In a glimpse, we can now see that “canal plus”, “cannes festival”, “nadine labaki”, “sony classics”, etc., have helped disseminate the information to ten groups or more.

The sheet used for this post can be downloaded here.

 

Facebooktwitter Facebooktwitter

From Smart Mobs to Smart Govs

My presentation “From Smart Mobs to Smart Govs*” in the Tech4PoliticalChange panel at the Tech4Freedom conference that took place at the Riviera Hotel in Beirut, Lebanon, on Thursday 14 and Friday 15 of December 2017.

*Smarts Govs is a term I have invented to describe governments, dictators, political establishment and political actors who learned how to use digital tools to their advantage, shifting power back to its original position.

Facebooktwitter Facebooktwitter

From “What” to “How”: A Twitter Discussion Analysis

 

On Nov. 5, 2017, after the resignation of Prime Minister Saad el Hariri on TV from KSA, the trending hashtag in Lebanon was #استقالة_سعد_الحريري (the resignation of Saad Hariri). The discussion on Twitter was revolving around the “What” happened.

The day after, the discussion, on the contrary, was focused on the “How” it happened, mainly a new hashtag #الاقامة_الجبرية or “house arrest” (forced residence).

This shift in perspective is quite interesting from a political point of view because it automatically negates the effects and reasons for the resignation, and even the resignation itself.

We ask ourselves how did this really happen on Twitter? Based on a sample of 6,867 tweets all containing the “house arrest” hashtag, we conclude the following:

  • The hashtag was initially launched by ArabTimes and MBNsaudi pertaining to the arrest of several princes in KSA, not including Saad Hariri
  • The hashtag was reetweeted and “owned” by Wiam Wahab who added Saad Hariri to the list of the arrested people
  • In our sample, 270 people mentioned, retweeted or commented on this post.
  • An interesting trending Tweet (161 engagements) is the one launched by Charbel Khalil, asking Saad Hariri to take a selfie anywhere outside his residence in KSA to prove he’s not detained.

 

Facebooktwitter Facebooktwitter

One Year of Presidency in Lebanon – A Twitter Discussion Analysis

The Sample

The following analysis is based on a sample of 11,919 tweets extracted using Twitter’s API. The search term for this sample is  #سنة_من_عمر_وطن  which is the  “one year from a country’s life” hashtag launched by the President’s movement(s). Twitter’s Search API is focused on relevance and not completeness. This means that some Tweets and users may be missing from search results. Unfortunately, it is not easy to determine the total number of tweets for this hashtag. However, we can roughly estimate this number to be between 20 to 30% of the total number of tweets for this hashtag.

 

Tweets have been grouped by cluster using the Clauset-Newman-Moore algorithm using NodeXL.

Almost Complete Absence of the March 14 Component

The most noticeable aspect of the discussion is the almost total absence of politicians of March 14. Saad Hariri was mentioned by some users but did not tweet himself (as least in our representative sample). Samir Geagea and Walid Joumblatt did not appear in the sample.

 

In fact, we double-checked Samir Geagea’s profile, and it looks like he never tweeted regarding the end of the first year of the presidency.

 

Only a very small group of people (9 users in our sample) attacked the regime and its relation with Hezbollah. Two other groups of 20 users (total) sarcastically commented on the President’s answers to the journalists.

 

The logical explanation for this behavior is the extreme polarization of the Lebanese society. In such cases of strong polarization, people from politically competing groups don’t use the same hashtags or join the discussion. This explains their almost total absence.

 

The Overwhelming Joy of Followers

The hashtag was launched by the pro-President movement. It is therefore logical to have an overwhelming presence of pro-President users tweeting and using the hashtag.

 

Pro-President users are not however a tight crowd, i.e. a close community. The largest group of tweeters is 493 users tweeting 2056 times. This group does not include a notable politician, not even the President.

 

A dismantled community

The fact that the largest pro-Aounists group of tweeters is leaderless could be interpreted as a symptom of leadership crisis.

 

This is also shown in the  way pro-President groups are divided:

  • A leaderless group (493 users, 2056 tweets)
  • A President-Bassil-Kanaan-Jamil el Sayyed group (96 users, 269 tweets)
  • The official account for the Presidency (77 users, 125 tweets)
  • An Alain Aoun group (57 users, 69 tweets)

While many bridges connect the Kanaan-Bassil-Sayyed group (Kanaan being the most retweeted) to the main group of fans, the connections between this group and the Alain Aoun group are almost non-existant (5 in total).

 

Part of the Pro-President group is discussing with the Kanaan group (224 incoming connections and 142 outgoing connections) while other users from this group are discussing with Alain Aoun (52 connections and 35 outgoing connections). An explanation would be that, while the President’s fans are all happy with the “successes” of the first year of presidency, they look divided in terms of affiliation.

Hezbollah’s Support

It is rare not to see Hezbollah’s fans join political discussions on Twitter. In the case of the presidency’s hashtag, we notice some very strong support from Hezbollah’s users with tweets about the alliance between President Aoun and Sayyed Hassan Nasrallah.

 

The Importance of the Role of Mr. Gebran Bassil

While the discussion was primarily centered around the presidency, it is important to mention that a discussion about the positive role (as a supporter of the Hezbollah) and another one about the negative role of Gebran Bassil (corruption) was taking place.

 

Even though only a few users discussed the role of Mr. Gebran Bassil, this shows that he is a major concern (positive or negative) to many citizen.

 

Suleiman Frangieh Supporters

Finally, the most important aspect of the debate is probably the fact that the second largest clique in the discussion is a group with several discussion “mayors”, the most important two being Suleiman Frangieh supporters, Sleiman Frangieh (note that this is a different Suleiman Frangieh – @avsl_frangieh) and Georges Bou Nassif (@georgesbnassif). These users challenge the so called “success” by asking “which country are you talking about?”

Independents and Journalists, like Mariam al Bassam (New TV) and Yazbeck Wehbé (LBC), are also part of the debate against the “happy ones”.

The absence or at least very small involvement of people from the Future Movement, the Lebanese Forces and the Kataeb is noticeable.

 

As a result, we suggest that the real skirmish today is between the President’s supporters and Mr. Suleiman Frangieh’s supporters, while other Christians and ex-14 March groups are taking a distant neutral and silent stance from the joy or the frustrations of the first year of Presidency.

 

Facebooktwitter Facebooktwitter

AUB – OSB – Social Media Strategy Course 2017

Rita Hayek
Rita Hayek – OSB MBA
Michele Khalife – Total Liban
Michele Khalife – Total Liban
George Khalaf – YouTuber
George Khalaf – YouTuber
Rachad Saddi – Google
Rachad Saddi – Google

 

Nasri Messarra – OSB – AUB
Nasri Messarra – OSB – AUB

I would like to thank all my guests, Mr. Rachad Saddi (EMEA Channel Partner Manager, Global Partnerships at Google), Mrs. Michèle Khalifé (Head of Marketing and Communication at Total Liban),  Mrs. Rita Hayek (Actress), Mr. George Khalaf (YouTuber and Film Director) for joining in and sharing their experience with my students.

 

Special thanks to Marc Smith and Arber Ceni for their support with NodeXL and for making sure we have the best experience in mapping Twitter and Facebook discussions.

 

Finally, thanks to all my students for making this time memorable: Jinane Chamseddine, Maya Kabakibi, Nada Jahchan, Reel ElZein, Jad Makarem, Sara Mansour, John Tamer, Bassem Youssef, Wael Abi Jumaa, Ralph Adaimy, Muriel Fourcroy, Joelle Audi, Ghida ElBaba, Elisa Samaha, Sarah Bou Daher, Joseph Yazbeck Ramadi & Layal Hossary.

Facebooktwitter Facebooktwitter

K2PCenter Training

Third training session about Twitter discussion analysis at the Knowledge to Policy (#K2Pcenter) Center of the American University of Beirut. Social Graph visualization using NodeXL. Thanks for all those who joined the #k2pworkshop discussion.

Facebooktwitter Facebooktwitter