Data Study on Terrorism Across Regions

Posted on Feb 20, 2019
The skills the author demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.

The frequency of terrorist attacks is increasing over time, which presents a greater need for analysis to reveal trends and inferences. This data study used various visualization techniques in R to display the differences in attacks across countries and over time.

Map

In order for the data to be clearly displayed for the user, a world map was used to exploit the differences across countries (displayed above). A choropleth map was used as the base layer of the map to display the frequency of attacks in which countries with high frequencies were represented by darker colors. Labels for each country showed the frequency of attacks since 1970, along with the most common type of attack, target, and weapon. The regions with the most activity were southern Asia, Middle East and North Africa, and the Western part of South America.

Blue markers were plotted on top of the base map to display the coordinates of each attack. Because many attacks were included in the dataset, only attacks in 2017 were plotted to ensure the map wouldn't be operating at a slow speed (however, all data points were used for all other aspects of the project). A slider at the bottom allowed the user to view the changes in attack throughout 2017 in which steps on the slider represents months of the year. Observing the points change over time revealed that the general locations targeted did not drastically change throughout 2017. In other words, if a city was targeted early in 2017, it was likely to be targeted again in later months.

Data on Attack Types by Region

Another visualization tool used was an interactive stacked bar graph displaying the frequency of each attack type. The application gives the user the opportunity to add and subtract regions, depending on the parts of the world that he/she wish to explore. This chart shows that bombing attacks are the most common globally and armed attack is the second most. Additionally, it appears that regardless the type of attack, the distribution across regions stays constant in which the Middle East and North Africa, South Asia, and South America account for the greatest frequencies.

Data Study on Terrorism Across Regions

Attacks Over Time

The last method of visualization was a plot of attacks from 1970 to 2017. The frequency over attacks is clearly rising over time with its peak being in 2014. Data from 1993 was excluded by the creators of the database. The graph reveals a high activity of terrorism in Central America and the Caribbean during the 1980's, but little activity in that region after that. In the last decade, the Middle East and North Africa, South Asia, and Sub-Saharan Africa have accounted for the overwhelming majority of attacks.

Data Study on Terrorism Across Regions

Conclusion

The purpose of this study was to allow the user to clearly visualize differences in terrorist attacks across regions and time. The distribution of each type was shown to be fairly constant across regions, while the distribution across regions did not remain constant over time. An idea for further analysis would be to display a network between origin country of the attacker and the targeted country. This database did not include the nationality of the attacker, so a network between countries could not be displayed on the map.

R code for this project can be found here.

Site URL:Β https://brosen.shinyapps.io/rShiny_Terrorism

About Author

Benjamin Rosen

Ben recently graduated from the NYC Data Science Academy to achieve his goal of becoming a junior data scientist. He has a passion for predictive modeling and using analytics to enhance decision-making. Ben earned his B.A. in economics...
View all posts by Benjamin Rosen >

Related Articles

Leave a Comment

No comments found.

View Posts by Categories


Our Recent Popular Posts


View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI