Mapping Election Influence On Social Media: Part One – Twitter

This is the Twitter universe of the elections. Every star is a tweep; every line is a tweet, retweet or a mention.


Beautiful, isn’t it?

This is a visual representation of a week’s worth of Twitter conversations from #GenElecSL and #SLGE15, the two most popular hashtags related to the 2015 General Election. I’ve set about mapping influencers on social media – and the first part of the map is Twitter: the second is Facebook. For this first part,  I’ve downloaded the tweets using NodeXL (from the Social Media Research Foundation) and mapped them out with Gephi, the open source data visualization software, first using the Fruchterman-Reingold algorithm, then using the Force Atlas 2 for clarity. Keep in mind that the accuracy of this analysis is based entirely on how Twitter’s API presents data (algorithm unknown, but widely assumed to be chronological).

Before we begin, let me declare that I, Yudhanjaya Wijeratne, while having my own political preference, have not in any way willfully misrepresented any facts here due to those preferences.  This analysis was conducted as part  of a larger effort spearheaded by the Sri Lanka Press Institute. 

On with the show. What you see is 6184 conversations carried out among 1774 people. Let me be my own devil’s advocate and point out that this is really a very small chunk of the Sri Lankan population, and possibly irrelevant in the greater scheme of things: while there are Sri Lankan Twitter accounts with substantial reach, actual discussion is limited to a small community of people talking mostly to each other. Nevertheless, let’s see who’s who.

In order to weed out the spambots, I’ve configured the visualization to identify accounts that have inbound data – retweets and direct tweets, implying either agreement, conversation or argument – as well as outbound data (tweets).

Click for full size

The red circles are ones that tweet a lot. The large circles are the ones that get tweeted at a lot. The large, red circles are the ones that tweet and get tweeted at – the apex of engagement.

Here are the accounts that get the most amount of attention:


  • @presrajapaksa 145,736 followers
    The former President and his social media team.
  • @maithripalas 15,233 followers
    The current President of Sri Lanka and his social media team.
  • @nalakag 4,513 followers
    Nalaka Gunawardene; journalist, science writer, communication specialist, blogger and consultant.
  • @rw_unp 9,183 followers
    Ranil Wickramasinghe, present Prime Minister and long-time head of the United National Party.
  • @upfasl 1,115 followers
    The official Twitter account of the UPFA.
  • @srilankatweet 14,475 followers
    An account largely tweeting political news, apparently run by Dinesh De Alwis, a journalist with the Associated Newspapers of Ceylon.
  • @azzamameen 15,454 followers
    BBC reporter / producer Azzam Ameen. Was one of the most active tweeps in the space surrounding the January 8 Presidential Election as well.
  • @dinouk_c 2,595 followers
    Freelance journalist for Al Jazeera in Sri Lanka and a photographer to Getty Images. Noted for his (sometimes hugely controversial) undercover
  • @dmbreakingnews 126,456 followers
    The official twitter account of the Daily Mirror.
  • @groundviews 32,605 followers
    The official Twitter account of Groundviews, the independent
    journalism website run by Sanjana Hattotuwa.

Ranked by order of content output, this becomes:

1) @nalakag
2) @upfasl
3) @groundviews
4) @dinouk_c
5) @azzamameen
6) @srilankatweet
7) @dmbreakingnews
8) @rw_unp
9) @maithripalas

Overall, it is seen that politicians – like Mahinda Rajapaksa – are almost inactive here, a stark contrast to the situation leading up to the January 8th Presidential Election. They nonetheless sit at the center of a sea of attention from the vox populi. Journalists and media-affiliated accounts, like Nalaka Gunewardene and Dinouk Colambage, seem to wield substantial influence in this sphere.

This inactivity of the Presidents and would-be Presidents is in stark contrast to the January 8th election, which I mapped out on an article titled “Who’s been running the #PresPoll?” on (see There, @PresRajapaksa was one of the most active tweeps. It should be noted that @AzzamAmeen and @NalakaG also showed up in that analysis, leading me to conclude that these two shape much of the Sri Lankan political discussion on Twitter.

In the days of the #PresPoll

Back to the present. The highest output, as always, is maintained by spambots – both machine and human – who do little but retweet. The exception is Nalaka Gunawardene.


While third in the attention race, his account ranks sixteenth in terms of output. I have yet to weigh input versus original output and create a scoring mechanism, but visually, it looks like @nalakag is driving the election discussion on Twitter. If not driving, he’s in the front seat peering out through the window.

Out of this dataset:

There are 807 mentions of the UNP, whether as a word, mention or part of a retweet
908 mentions of the UPFA
20 mentions of the SLFP
270 mentions of the JVP
and 213 mentions of the TNA likewise

This data doesn’t tell us what people think of these parties, but gives some clue as to what most of these people might be discussing.

A key takeaway should be that there are only 1774 people discussing this, and that’s accounts – weed out the spam and we’re left with substantially less. Twitter, then, while a wonderful tool elsewhere, is mostly a handful of influencers convincing each other. While the real-life impact cannot be quantified, I have a feeling that this space – already demographically skewed towards more ‘connected’ people than your average Facebook use – may not really be worth engaging in for many politicians. Going by the numbers, the biggest audience is elsewhere.  Expect Part Two of this brief study – Facebook – to have much larger numbers.

For those interested, I’ve uploaded the raw data: links below.

Tweets from #GenElecSL – the Excel sheet.
Tweets from #GenElecSL – the GraphML file.

Tweets from #SLGE15 – the Excel sheet.
Tweets from #SLGE15 – the GraphML file.

#SLGE15 + #GenElecSL, in GraphML format.

Note that there is more data in there than was parsed for this analysis – there might be more to find (sentiment analysis, anyone?). If you do, drop me a line here – I’m always interested.

7 thoughts on “Mapping Election Influence On Social Media: Part One – Twitter

  1. Hi Yudhanjaya,

    Great work as ever.

    Wonder if you’ve seen The data, capturing eight weeks of the campaign period, dwarfs the dataset you’ve worked with (though some deduplication would be necessary before any plotting). Wonder if it changes your analysis too, esp. the point that according to you, Facebook was used more / more influential?

    Also, in your piece, you’ve not noted the time period you’ve captured the data, which is important especially when dealing with an election campaign, where things heat up towards the end and/or around specific instances within the duration of the campaign.

    Very best,


    1. Hi Sanjana,
      Thanks. I should have a look at that data. The date IS mentioned, btw – 7 days leading up to the election, including Sunday the 16th.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.