Exercice NodeXL (Français – 2017)

Nous avons collecté 16,057 tweets contenant le nom « trump » (semaine du 28 Décembre 2017).

Vous pouvez installer et utiliser NodeXL Basic (http://nodexl.codeplex.com/) ou simplement Excel pour consulter les données et variables (qui ont déjà été calculées)

  • Regarder le graphe. Que pouvez-vous en déduire ? (se baser sur les modèles présentés dans l’article : http://www.pewinternet.org/2014/02/20/mapping-twitter-topic-networks-from-polarized-crowds-to-community-clusters/).
  • Qui sont les vingt plus grands influenceurs du groupe (degree-in) ?
  • Qui sont les vingt plus grands « influençables » du groupe (degree-out) ?
  • Quelle est la différence entre les deux ? Discutez
  • Quelles sont les 5 personnes qui sont au « centre » de toutes les discussions (closeness-centrality) ? Que signifie cela (chercher la définition sur Internet et l’expliquer dans ce cas précis)
  • Quel est la personne qui est au centre de la discussion (
  • De quoi parlent les 5 premiers groupes (G1 à G5) ? s’inspirer des « top words in tweets » de la feuille «Twitter Search Ntwrk Top Items» du fichier Excel.
  • Que pouvez-vous dire du groupe G3 (noter que dans la feuille « Groups », dans le groupe G3, « total edges » et « self-loops » sont égaux) ?
  • Dans la feuille « overall metrics », expliquer (en cherchant les définitions sur Internet et en expliquant pour ce cas précis):
    1. Graph Density
    2. Modularity
    3. Vertices
    4. Edges
    5. Edges with Duplicates
    6. Reciprocated Vertex Pair Ratio
    7. Connected components
    8. Maximum Vertices in a Connected Component
    9. Diameter (Maximum Geodesic Distance)
    10. Average Geodesic Distance
  • Vos remarques et réflexions personnelles sur cette discussion

NodeXLGraph Trump (13 MB, ne pas oublier d’activer l’option “Enable Edit”)

 

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.

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.

 

Who’s leading the #لبنانيون_ضد_حزبالله discussion?

A new trending hashtag, #لبنانيون_ضد_حزبالله has emerged in the past few days, following the televised resignation of Prime Minister Saad Hariri in Lebanon and the start of the Lebanese-KSA crisis.

 

We briefly analyze the “Lebanese against Hezbollah” hashtag to better understand its origin and its propagation on Twitter.

 

Our sample of 117 tweets is extracted on Nov. 12, 2017 from Twitter using NodeXL and Twitter’s search API.

Fragmented Clusters

The structure looks like a set of fragmented clusters led by a broadcast leader. There is no real discussion about the subject. One tweet is launched and a group of followers is retweeting back. This does not seem like a genuine discussion, more like an “engineered” one.

 

With this shape of network, it is very unlikely that this would be a trending hashtag or that it will last for more than a couple of days.

Overwhelming Presence of Saudi Accounts

Given the timing of the launch of the hashtag, we wonder who has initiated it.

 

In the chart below, vertices are labeled based on their country of origin (COO) – vertices with a “zero” label do not have a country set in their profile.

Based on the above and on the pivot table generated (below), it looks like the “lebanese against Hezbollah” hashtag was mostly generated and distributed by KSA residents or citizen (25%) and not by Lebanese residents or citizen (less than 1%).

 

There is a margin of error to take into consideration (58% of the sample without a specified country). However, the overwhelming presence of declared Saudi residents/citizen against Lebanese residents/citizen in the sample, is significant enough.

 

COO Count of Country
Azerbaijan 1
Egypt 1
Indonesia 1
Iraq 2
KSA 27
Kuwait 3
Kyrgyzstan 1
Lebanon 1
N/A 61
Oman 1
Qatar 1
Romania 1
Sweden 1
Turkey 1
UAE 1
UK 1
USA 1
Grand Total 106

 

Mayors and Diffusers of the Discussion

The chart below shows the mayors of the discussion with their respective weight (in-degree):

 

A Time-Based Animation of the Discussion

 

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.

 

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.

Twitter double authentication and security via SMS

A few months ago, I posted two tutorials about login approvals via SMS on Facebook and two-step verification on Google.

In this walk through, you will find the steps required to do the same on Twitter. Once these steps are performed, a secret numeric code will be sent to your phone by text message (SMS) every time you or someone else tries to log in to your Twitter account. This code will be required with your password to authenticate you and allow you to log in and access your account.

1- Login to your Twitter Account

2- Go to Settings

1

3- Click on security and privacy on the menu (left). If you already have a phone linked to your account, skip to step 5. Otherwise, you should see an “add phone” link:

4

4- Click on add a phone and type your phone number. You should receive a code by sms to verify your phone number.

6

5- Once you have linked your phone number to your Twitter profile, check “send login verification requests to #your phone number#”. Note that you can also choose to send verification codes to your phone via the Twitter app (rather than by text messages / sms) if it’s already installed on your phone.

2

 

Simple Walkthrough to Visualizing Twitter Data on NodeXL

In this post, we will consider analyzing the Arabic hashtag 1 with NodeXL. If you’re searching for a Latin string or hashtag, go directly to step 3.

1- On some computers, searching for an non-Latin string may cause NodeXL to return a null result. The safest option is to convert the Arabic string to URL code. Several websites offer a conversion tool. Look for “URL encode decode” on Google. We will use the following website: http://meyerweb.com/eric/tools/dencoder/.

2- type the hashtag in the text box and press “encode” then copy the resulting code:1 2

3- Open NodeXL and select “import from Twitter search network”:

3

4- Paste the code from step 2 in the search box. You may want to limit the number of tweets (in this example, we limited the number of tweets to 1,000). Note that you may need authorize NodeXL to use your twitter account if this is your first Twitter analysis.

4

5- The worksheet is automatically filled after the search. In the vertices sheet, you can check the names of the tweeters and some useful information about their popularity (followers) that can be combined with other data in your analysis:

1

6- Choose the “Harel-Koren” algorithm and “show graph”:

2

In its current state, the graph doesn’t say much. Yet, it can give you an idea of the structure of the network and you can mouse-over the vertices to read the tweets and the mentions. We will improve the layout in the next steps.

7- In the NodeXL ribbon tab, click on “Graph Metrics”. Then, “Select All” and “Calculate Metrics”.

1

8- The data compiled can be used to analyze the network and its characteristics (outside the scope of this article which is limited to retrieval and display). Note, that in the vertices sheet, the “in degree” represents the number of times the tweeter was mentioned and the “out degree” the number of times he mentioned someone else. 2

9- In this step, we will group the vertices into clusters. In the NodeXL tab on the ribbon, click on “groups”, “group by clusters” and put neighbourless in one group to avoid having all your singletons displayed as a stand alone group:

1

Note the Groups and Group Vertices worksheets.

10- In the layout algorithm dropdown, select “layout options” and “layout groups…”

2

1

11- The resulting graph show small independent clusters with no interaction between each other. Note the singletons in the first group (people who were never mentioned). Check the following article for details about twitter network structures: http://www.smrfoundation.org/2014/03/02/6-kinds-of-twitter-social-media-network-structures/

2

12- To display images instead of dots, in the vertices sheet, select “image” in the shape column, go to the NodeXL tab in the ribbon, select group, group options and check “the shapes specified in the shape column….” to use the shapes defined in vertices sheet instead of those defined in the Group Vertices sheet (this also works for colors).

1

Note the size and opacity options you can also use to improve the layout.

13- The Autofill option allows you to quickly fill a column to modify the layout of your graph (note that you need to refresh the graph to see the results). Try to change the shape, opacity, etc.

3

In this screenshot, the size varies from 1.5 to 100 depending on the in-degree (number of times the user was mentioned):

1

14- To ungroup the vertices, select layout options from the algorithm dropdown in the graph and select “layout entire graph” instead of group… (see step 10)

15- to save the graph as an image, right-click on it and select “save to image”

16- to share your work with others (optional), choose “export to NodeXL Gallery” from the NodeXL tab in the ribbon

Articles and videos to watch and read:

– About Twitter Network structures: http://www.smrfoundation.org/2014/03/02/6-kinds-of-twitter-social-media-network-structures/

– About social networks, mapping and measuring Connections: https://www.youtube.com/watch?v=b5RonanIOF8#t=26

– A walkthrough to using NodeXL to visualize twitter networks: https://www.youtube.com/watch?v=PC-PgkhpsNc