#AttaqueBardo: Analyzing Bardo museum terrorist attack on Twitter

Apr 2, 2015

#AttaqueBardo: Analyzing Bardo museum terrorist attack on Twitter




The past terrorist attack in Tunisia has been the most violent attack on tourists in the country's history.
I have tried to analyze how did this event impact Tunisia's image in social media, and in particular on Twitter.

Twitter has been used to post and share information about major events in Tunisia, starting from the revolution, where internet activist shared info about the protests, providing the world with real-time updates of the situation in local towns where there have been protests and violent events.

Tunisia has been under major threats from terrorist groups . These extremists have been planning and executing violent attacks on police forces, military and national guard agents throughout the country.

The negative impact of these attacks is direct on tourism and investment in the country.

Terrorist attacks create panic just few months before the summer season, which is the highest period of hotel reservation during the year.


Photos of the hostages being held inside the Bardo Museum




I have been curious to know the impact of such event on the image of Tunisia worldwide, since this particular sad attack has had international victims. So I would expect to see a large number of Tweets coming from various countries.

The motivation for this article was also related to the similar terrorist attacks in France and their impact on social media. It has amazed me how the world is reacting to international events and how such attacks can spread the word about a country, and the probable positive or negative effect the social media could have on tourism in the country.

To start, I need to clear some points :

1- All the data I worked with were extracted from Twitter.com
2- Public tweets extracted were strictly relative the the hashtag #AttaqueBardo
3-I have extracted all tweets from the period between the day of the attack and 48 hours later.


1- Twitter is a very popular social media service where trending events get shared and spread very fast. I have made this choice because the data shared on Twitter is publicly available and it is very easy to extract it and analyze it.

2 -I have made this choice because the first ever hashtag shared by a Tunisian media website has used it, it is in French which is the second language in Tunisia, and it would guarantee a large amount of data being related to this particular hashtag, since the primary source of information and updates about the event were Tunisian media channels and websites, so all the shared photos, videos and articles will be referring to the main hashtag of the event. I am well aware of the English version and the Arabic version of the hashtag as well, but I have excluded them from the study due to limitation in the extraction capacity twitter gives to normal users.

3- I wanted to study the immediate impact and real-time spread of the information about the attack on social media, so it seemed logic to me to restrict the data to a short period of time, since Tunisia is in the center of the world ( geographically speaking ) so it would only take  one day for the news to spread, this way the folks back in Sidney Australia and the people in Honolulu Hawaii would have the time to know about the attack and to interact with it.


  1. The Tweets : 

Everything starts from the zero-hour. Wednesday march the 18th 2015  was a normal  day in the lives of Tunisian, when all of the sudden at approximately 12:30 a couple of armed men attacked tourists on a shooting spree. This attack resulted on 24 victims dead and about 45 injured.

The first Tweet:


The first Tweet ever mentioning any event about the Attack was published at 12:32, approximately two minutes or so after the first shootings on the bus outside the museum .

It was re-tweeted 45 times and it started the whole trend with other news and updated shared on the same hashtag.

The graph bellow shows the evolution of tweets shared during the observation period. I have calculated the number of tweets posted each minute by each individual user, and that gave me a chart like this:





The largest volume of tweets was shared during the first 4 hours following the attacks. this shows how fast the news can spread in a short period of time over social media.

To get a clearer idea of the general trend of Tweets volume, I have aggregated the data to an hourly basics, each point of the graph represents the sum of tweets shared on a particular hour:




It is obvious that the largest number of tweets will be shared during the first 24 hours of any particular event. and this is confirmed by the trend seen in our previous graphs:





I've tried digging deep in the data to have more information about what we have.

- The most shared tweets were :

Two particular tweets took the prize of the most shared or re-tweetd information about the attacks. They were CNN's and France 24's Breaking news about the event.





There were previous tweets from both users about the events, but these tweets did not have our hashtage #AttaqueBardo, so I had to look them up and search for the time when the first tweet about the event in Tunisian has happened exactly.




- The most followed 5 users who tweeted about the #AttaqueBardo were :


User     Followers

1- @france24 : 1462044              6- @nawaat : 229440
2- @jeune_afrique : 570214       7- @zeinobia : 189230
 3- @la_stampa : 512786             8- @bylasko  :182115
   4- @mayadiab : 493143              9- @pdnetwork : 160168
            5- @la7tv : 302032                      10- @emnabenjemaa : 138124


Let's note that the number of followers were extracted at the same time when the tweets and all the data were extracted in, so as I have already checked, many of these users had an evolution of their followers number.


Having a user with a huge number of followers posting about a particular event will have a significant impact on the spread of any information online in social media. These kind of users have a reach of hundreds of thousands of other twitter users who are exposed directly to their news feed in real time. So along with conventional media such as radio and television, social media "Influences "  are very important "hubs" to spreading viral information online.


-The top 5 associated hashtags in tweets were : 

1- #attaquebardo  2- #tunisie  3- #bardo  4- #tunis  5- #tunisia  6- #jesuistunisien

The correlation between hashtags to users is not always of a logical significance. It is always a random choice for any user to associate a hashtage to the information they are sharing. The goal is mainly to have as much exposure for the tweet as possible, so it would be obvious that a particular user might associate the tweet with a well known hashtag of the country where the event is happening or with other hashtages of the attacks in other languages. I have noticed that there were a certain behaviour of users which was to add a non-related hashtag to the tweet in order to get internationl exposure for the attacks. For example we might find #NewYork or #Paris used as hashtags, to get the attention of other user segments so they can go directly to #AttaqueBardo and read about the attacks.

- The top 5 languages used with the hashtag were :
 1- French 2- Arabic 3- Italian 4- English 5- Spanish

The information we get here is very important because it gives us an idea of the targeted public users and the languages tweets are written in. For example, if this event was about a certain local football match, we wouldn't normally expect the tweets to be written in Italian. But in our case, since we have 15 Italian victims in the attacks (4 dead, 11 injured) it would be normal to have a large number of tweets shared in Italian, by Italian users as well as other users trying to spread the information to Italian users.

- The top 5 locations from where the tweets were shared : 


1- Tunisia    2- France   3 -Italy   4- Spain    5- The UK    6- The USA   


 This part was very tricky to get done, since the location information is available on the user's personal profile, and it does not have a unified format, so every user can enter a text which is supposed to be the name of the city or country they are from.

Since Twitter does not have a restricted list where user is obliged to pick a location from a pre-fixed list, I have had an enormous amount of variations for the location information and It required some extra work to be able to clean the messy data, and merge similar locations written in different languages and variations, to finally obtain an aggregated number of locations classified by country name, and not by city, town, continent, street number..etc



I finally wanted to finish this article by making a social network graph that maps the interactions and relationship that evolved the event.







The work that I've done with this article is yet to be enhanced and optimized. 
There were no deep analysis for the tweets and their content or any predictive modelling done on the data. 

It was all a descriptive'ich study that was a simple exercise for me to practice publishing on my blog,a  new hobby I want to keep doing, every night from 21 pm to 23 pm and I intend to keep working on this data set in the near future!

Please comment or get in touch if you have any remarks or comments about this article or if you need to chat about the tools that I've used and the methodology of my work.