I am currently studying Data Science so the best approach to learn is by doing it real time and being a Pakistani I would look at the data from my own country to analyze and visualize and unfortunately the first thing flashed in my mind was terrorist attacks in Pakistan.

So, I start looking for databases of terrorist attacks in Pakistan and I found one at Global Terrorism Database by University of Maryland.

Before proceeding with data, I would like to highlight an important element in data that I think is missing. GTD used coordinates of the cities instead of actual place of incident that makes it less effective when analyzing the data. If we had actual coordinates of the place of incident, at least we would be able to analyze which part of the cities are more vulnerable and what could be the possible reasons, also we may can learn about upcoming attacks by running predictive analytic model or with the help of machine learning.

One last thing before we move forward, I’m not an expert (at a moment) in Data analysis or visualization. So, pardon me if it could be better or my analysis is weak.

I have analyzed both Pakistan & India. Why India? Because we are love birds and we do it all the time. I did it for the same reason this Indian guy tried to find “Terror in Kashmir and Pakistan’s Involvement” at Kaggle.

I have few words for Mr. Anshul: You could better serve your country and this community by bringing up real problems in India instead of wasting your time on something of least importance.

The following visualizations were made using data with at least 1 causality as a result of terrorist attacks.

Overview of Terrorist Attacks in Pakistan

Years analyzed in this data are 2002 to 2015: According to GTD, there are more than 10,000 terrorist attacks in Pakistan with little over 18,000 people were killed and more than 30,000 wounded.

Overview of terrorist attacks in Pakistan

It looks like entire Pakistan is effected which is quite true but most of the attacks carried out in Baluchistan, FATA & KPK.

These three regions lie on the border with Afghanistan!

Overview of Terrorist Attacks in India

That’s how the terrorist attacks in India looks like on a map.

It starts from Kashmir and goes deeper in East, South, North and South-East India.

If Pakistan is exporting terrorism in India, why don’t we see any activity across the 2900+ KM border? Why only Kashmir has trouble? Because it’s a disputed territory between India & Pakistan and people of Kashmir fighting their war of freedom which has also been included as terrorism in GTD database.

According to GTD, 6488 terrorist attacks were recorded in India during 2002–2015. Little more than 7600 people killed and over 14400 wounded. 329 attacks were carried out by “Islamic” groups inflicted 1119 causalities in last 15 years while the rest goes to the “non-Islamic” groups. As we can see below, more than 95% of attacks by “Islamic Groups” were in Kashmir, again, disputed area with active freedom movement.

Here are all the attacks by “Islamic” groups in India looks like on a map…

Attacks by “Islamic” groups in India

Dear India! Your problem is neither Pakistan nor Muslims.

Most Effected Regions in Pakistan

FATA happened to be the home ground of terrorist outfits like TTP but for the number of attacks it’s third in the list which is obvious for a reason that there are not much “valuable” targets. First region came in their way after rising from FATA is KPK thus inflicted most of the damage.

There is nothing in between Baluchistan and Afghanistan so making it to the second is very obvious even though the total population of Baluchistan is no more than 5% of Pakistan.

Punjab is most populous region in Pakistan with more than 50% of total population. We should have seen maximum number of attacks in Punjab, Sindh and Islamabad if we assume that cause of terrorism lies internally in Pakistan but we see positive correlation between number of attacks and geographical location (Border with Afghanistan) of most effected regions. There is one more reason that caused more terrorism in these regions. These are neglected and under developed areas as compared to the rest of the country.

Sindh is not bordered with Afghanistan but the reason for large number of attacks in there is political and ethnic wars with each other and security forces.

Here is a closeup of attacks in FATA/KPK & Punjab.

Number of Attacks & Causalities by City

Karachi is Pakistan’s largest city with more than 20 million population. So, made it to the top of the list followed by Quetta and Peshawar.

Number of Attacks by Group

This is interesting that as soon as we see rise of TTP in FATA, we also see rise of Baloch terrorist groups in Balochistan.

If we look at the number of attacks by different groups in India. It seems pretty obvious that Lashkar-e-Taiba (LeT) and Hizbul Mujahideen are at 6th & 7th respectively which make them way low threat (at least unless they deal with other groups first) to India.

Top 5 groups are…

1. Communist Party of India — Maoist (CPI-Maoist)

2. Maoists

3. United Liberation Front of Assam (ULFA)

4. Garo National Liberation Army

5. National Democratic Front of Bodoland (NDFB)

Number of Attacks by Year

Pakistan sees a surge in terrorist attacks in 2007. Here are few major incidents happened during and prior to 2007 that fueled terrorism in Pakistan.

1. India opens consulate in Afghanistan along Pakistan’s border.

2. Pakistan starts reporting Indian interference in FATA & Balochistan.

This report was published on 24th April, 2006, after four months, Pakistan killed Baloch rebel leader Akbar Bugti in Balochistan on August 26, 2006 that was further used to fuel insurgency in Balochistan.

1. Terrorists took over Lal Masjid in Islamabad, The Siege of Lal Masjid was a confrontation in July 2007 between Islamic fundamentalist militants and the Government of Pakistan.

2. Lal masjid operation was used to fuel insurgency in Swat. Tehreek-e-Nafaz-e-Shariat-e-Mohammadi (TNSM) took over much of Swat in 2007.

3. In December 2007 about 13 groups united under the leadership of Baitullah Mehsud to form the Tehrik-i-Taliban Pakistan (TTP).

But the good thing is; Pakistan seems to be winning its war against terrorism for last couple of years.

Number of attacks in India over years

Number of Attacks by Day of Month

Terrorist are most active at the first day of the month and least on the last day of the month.

Why? Well, I couldn’t come up with a solid reasoning behind this so can you help me understand?

Here are the number of attacks by day of the month carried out by TTP.

This is interesting that they carried out most of the attacks at 1st and 15th of every month.

Why? Maybe because they got paid bi-weekly based on the “performance”, who knows? :D

Widely Used Weapon Type in Terrorist Attacks

Terrorists used Explosive/Bombs/Dynamites (61.81%) followed by Firearms (31.98%)

Number of Attacks by Month

Terrorists like to strike in the month of May. I’m not expert on military matters but I’m sure someone out there can conclude why May has seen most of the attacks and why there were least number of attacks in the month of September.

While TTP seems to be most active in the month of January and least in October.

Foreign Nationals Killed in Pakistan

Total 427 foreign nationals were killed in Pakistan during 2002 to 2015, majority of them were Afghans that is obvious for a reason that Afghans lives in terrorism hit areas like FATA, KPK & Balochistan and they also became victim along with Pakistanis.

And that’s not all!

There will be many wonderful Data Scientists in Pakistan who can extract even more valuable information from this database and share with us.

After spending days on this data, I concluded that Pakistan & India should spend more time raising living standards of their own people by focusing more on the neglected areas instead of bashing each other. Terrorism will be down by 70% in no time.