EDA on Terrorism Dataset
Data Analytics

EDA on Terrorism Dataset

Import the required libraries

Libraries used such as pandas, Numpy, Matplotlib, Seaborn.

Read the dataset

Import the dataset from excel to notebook using pandas ‘read_csv’.

Understand the dataset

Find the size of the data using shape() and describe the data to know statistics of the data using describe().Find the missing values in the dataset.

Imputation of missing values


Performing Univariate Analysis

Analyzing the one variable and plot the graph to know the distribution of frequency.



As we can see most of the terrorist attacks happened using explosives.

  • Lets find the top 10 countries which suffer most from terrorist attacks.

By above graph we can say that ‘Iraq’ is the country which suffer most from the terrorism followed by ‘Pakistan’ and ‘Afghanistan’.


  • Lets find the most attacked type of targets.
  • The most attacked targets are ‘Private Citizens & Property’ which is approximately 25%.
  • 10-20% is the target which is ‘Military’ and 'Police'.

Finding the most attacked regions and states.

  • Most attacked region is ‘Middle East & North Africa’.
  • Most attacked state is ‘Baghdad’.

Finding the number of deaths in different years.


Number of deaths cause were more in between 2014 and 2017. High peak went to 2014 with 45k+ deaths.

Bi variate analysis.

Analyzing with two variables and finding the relationship between the variables.

So lets analyze the wounded and killed people by different countries.



  • As we can observe from the above graph ‘Iraq’ has the most killed people(>70k) and wounded people (>1.2lakhs).


Now find out the type of people who are making more attacks.

  • Most of the terrorist attacks are done by ‘Taliban's’ and below is the graph that Taliban's  did attacks over the years.


  • In 2015 Taliban's killed more than 5000 people after that there is a decrease in the trend but still the numbers are high.


  • private citizens & property were attacked most followed by Military, Police, Government.
  • Middle east & North Africa was most attacked among the top affected region. Most of the people in this region either wounded or killed.
  • Iraq was the country which was most affected by terrorism.
  • The most common attack type was Bombing/Explosives.
  • Taliban's became more active since 2012 and they are responsible for most of attacks. 


  • Since private citizens & property are being targeted so stronger security and surveillance should be provided.
  • More surveillance is required especially in the Middle East & North Africa Regions.
  • Vemishetti Nagendranath
  • Dec, 27 2022

Add New Comments

Please login in order to make a comment.

Recent Comments

Be the first to start engaging with the bis blog.