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
![](https://zepanalytics.com/ckeditor-temp-images/d48268d60611aa91249e7d26e20496ce.png)
Performing Univariate Analysis
Analyzing the one variable and plot the graph to know the distribution of frequency.
![](https://zepanalytics.com/ckeditor-temp-images/10023f104923317976edd0b70269f6ca.png)
As we can see most of the terrorist attacks happened using explosives.
- Lets find the top 10 countries which suffer most from terrorist attacks.
![](https://zepanalytics.com/ckeditor-temp-images/35bf593d0eb699e4c9669336815df3a5.png)
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.
![](https://zepanalytics.com/ckeditor-temp-images/7790e9f320596f2d32dd5818bd187fea.png)
- 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.
![](https://zepanalytics.com/ckeditor-temp-images/fce71997ffa9e83bba82fa029febe83b.png)
- Most attacked region is ‘Middle East & North Africa’.
- Most attacked state is ‘Baghdad’.
Finding the number of deaths in different years.
![](https://zepanalytics.com/ckeditor-temp-images/42983575c2e35140adcde85e037169c0.png)
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.
![](https://zepanalytics.com/ckeditor-temp-images/a65e68e950fd005ddab67f96686034d9.png)
- 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.
![](https://zepanalytics.com/ckeditor-temp-images/63d8f2ea4a6edee18c1c5d5974e55385.png)
- Most of the terrorist attacks are done by ‘Taliban's’ and below is the graph that Taliban's did attacks over the years.
![](https://zepanalytics.com/ckeditor-temp-images/62f75d42d53ad8a10fae81c1cd1b7e2a.png)
- In 2015 Taliban's killed more than 5000 people after that there is a decrease in the trend but still the numbers are high.
Conclusion:
- 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.
Recommendation:
- 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