The Gloabl Terrorism database (GDS) is an open-source database including information on terrorist attacks around the world from 1970 through 2015. The dataset I am using contains more than 150,000 terrorism attacks worldwide from 1970 to 2015 except 1993.

## [1] 156772    137
## 'data.frame':    156772 obs. of  137 variables:
##  $ eventid           : num  1.97e+11 1.97e+11 1.97e+11 1.97e+11 1.97e+11 ...
##  $ iyear             : int  1970 1970 1970 1970 1970 1970 1970 1970 1970 1970 ...
##  $ imonth            : int  0 0 1 1 1 1 1 1 1 1 ...
##  $ iday              : int  0 0 0 0 0 1 2 2 2 3 ...
##  $ approxdate        : chr  "" "" "" "" ...
##  $ extended          : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ resolution        : chr  "" "" "" "" ...
##  $ country           : int  58 130 160 78 101 217 218 217 217 217 ...
##  $ country_txt       : chr  "Dominican Republic" "Mexico" "Philippines" "Greece" ...
##  $ region            : int  2 1 5 8 4 1 3 1 1 1 ...
##  $ region_txt        : chr  "Central America & Caribbean" "North America" "Southeast Asia" "Western Europe" ...
##  $ provstate         : chr  "" "" "Tarlac" "Attica" ...
##  $ city              : chr  "Santo Domingo" "Mexico city" "Unknown" "Athens" ...
##  $ latitude          : num  18.5 19.4 15.5 38 33.6 ...
##  $ longitude         : num  -70 -99.1 120.6 23.7 130.4 ...
##  $ specificity       : int  1 1 4 1 1 1 1 1 1 1 ...
##  $ vicinity          : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ location          : chr  "" "" "" "" ...
##  $ summary           : chr  "" "" "" "" ...
##  $ crit1             : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ crit2             : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ crit3             : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ doubtterr         : int  0 0 0 0 -9 0 0 1 0 0 ...
##  $ alternative       : int  NA NA NA NA NA NA NA 2 NA NA ...
##  $ alternative_txt   : chr  "." "." "." "." ...
##  $ multiple          : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ success           : int  1 1 1 1 1 1 0 1 1 1 ...
##  $ suicide           : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ attacktype1       : int  1 6 1 3 7 2 1 3 7 7 ...
##  $ attacktype1_txt   : chr  "Assassination" "Hostage Taking (Kidnapping)" "Assassination" "Bombing/Explosion" ...
##  $ attacktype2       : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ attacktype2_txt   : chr  "." "." "." "." ...
##  $ attacktype3       : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ attacktype3_txt   : chr  "." "." "." "." ...
##  $ targtype1         : int  14 7 10 7 7 3 3 21 4 2 ...
##  $ targtype1_txt     : chr  "Private Citizens & Property" "Government (Diplomatic)" "Journalists & Media" "Government (Diplomatic)" ...
##  $ targsubtype1      : int  68 45 54 46 46 22 25 107 28 21 ...
##  $ targsubtype1_txt  : chr  "Named Civilian" "Diplomatic Personnel (outside of embassy, consulate)" "Radio Journalist/Staff/Facility" "Embassy/Consulate" ...
##  $ corp1             : chr  "" "Belgian Ambassador Daughter" "Voice of America" "" ...
##  $ target1           : chr  "Julio Guzman" "Nadine Chaval, daughter" "Employee" "U.S. Embassy" ...
##  $ natlty1           : int  58 21 217 217 217 217 218 217 217 217 ...
##  $ natlty1_txt       : chr  "Dominican Republic" "Belgium" "United States" "United States" ...
##  $ targtype2         : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ targtype2_txt     : chr  "." "." "." "." ...
##  $ targsubtype2      : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ targsubtype2_txt  : chr  "." "." "." "." ...
##  $ corp2             : chr  "" "" "" "" ...
##  $ target2           : chr  "" "" "" "" ...
##  $ natlty2           : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ natlty2_txt       : chr  "." "." "." "." ...
##  $ targtype3         : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ targtype3_txt     : chr  "." "." "." "." ...
##  $ targsubtype3      : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ targsubtype3_txt  : chr  "." "." "." "." ...
##  $ corp3             : chr  "" "" "" "" ...
##  $ target3           : chr  "" "" "" "" ...
##  $ natlty3           : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ natlty3_txt       : chr  "." "." "." "." ...
##  $ gname             : chr  "MANO-D" "23rd of September Communist League" "Unknown" "Unknown" ...
##  $ gsubname          : chr  "" "" "" "" ...
##  $ gname2            : chr  "" "" "" "" ...
##  $ gsubname2         : chr  "" "" "" "" ...
##  $ gname3            : chr  "" "" "" "" ...
##  $ ingroup           : int  3629 3330 -9 -9 -9 2373 623 -9 100003 100003 ...
##  $ ingroup2          : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ ingroup3          : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ gsubname3         : chr  "" "" "" "" ...
##  $ motive            : chr  "" "" "" "" ...
##  $ guncertain1       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ guncertain2       : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ guncertain3       : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ nperps            : int  NA 7 NA NA NA -99 3 -99 1 1 ...
##  $ nperpcap          : num  NA NA NA NA NA -99 NA -99 1 1 ...
##  $ claimed           : int  NA NA NA NA NA 0 NA 0 1 0 ...
##  $ claimmode         : int  NA NA NA NA NA NA NA NA 1 NA ...
##  $ claimmode_txt     : chr  "." "." "." "." ...
##  $ claim2            : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ claimmode2        : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ claimmode2_txt    : chr  "." "." "." "." ...
##  $ claim3            : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ claimmode3        : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ claimmode3_txt    : chr  "." "." "." "." ...
##  $ compclaim         : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ weaptype1         : int  13 13 13 6 8 5 5 6 8 8 ...
##  $ weaptype1_txt     : chr  "Unknown" "Unknown" "Unknown" "Explosives/Bombs/Dynamite" ...
##  $ weapsubtype1      : int  NA NA NA 16 NA 5 2 16 19 20 ...
##  $ weapsubtype1_txt  : chr  "." "." "." "Unknown Explosive Type" ...
##  $ weaptype2         : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ weaptype2_txt     : chr  "." "." "." "." ...
##  $ weapsubtype2      : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ weapsubtype2_txt  : chr  "." "." "." "." ...
##  $ weaptype3         : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ weaptype3_txt     : chr  "." "." "." "." ...
##  $ weapsubtype3      : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ weapsubtype3_txt  : chr  "." "." "." "." ...
##  $ weaptype4         : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ weaptype4_txt     : chr  "." "." "." "." ...
##  $ weapsubtype4      : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ weapsubtype4_txt  : chr  "." "." "." "." ...
##   [list output truncated]

There are 137 variables in the dataset, to make it neat, I will have to do some subsetting, only keep the columns I need.

Tactics and Weapons

The most commonly used attack tactic from 1970 to 2015 involved bomb and explosives, followed by armed assault.

Let’s look at the most recent year - 2015.

Casualties

To obtain more detailed death information, I went to US Department of State Website download a small dateset with casualty information.

The total number of people killed in terrorist attacks peaked in April and July 2015, and the months with the most combined deaths and injuries were June, July, August, and September, January and May had the most kidnaps.

Perpetrators

Because there were so many unknown values in the original dataset, I have to fetch data again from US Department of State Website about terrorist group information.

Along with the number of terrorist attacks they carried out, these five terrorist groups were responsible for the most terrorist attacks in 2015. Among those five groups, Islamic State of Iraq and the Levant (ISIL) is world’s deadliest terrorist organization and responsible for more than 6000 deaths in 2015.

Who are they targeting?

## # A tibble: 22 × 2
##                     targtype1_txt     n
##                             <chr> <int>
## 1     Private Citizens & Property  4050
## 2                        Military  2923
## 3                          Police  2101
## 4            Government (General)  1145
## 5                        Business  1114
## 6                         Unknown   938
## 7  Religious Figures/Institutions   396
## 8                  Transportation   384
## 9    Terrorists/Non-State Militia   318
## 10        Educational Institution   286
## # ... with 12 more rows

Which countries/cities were the most dangerous in 2015?

## Source: local data frame [20 x 3]
## Groups: country_txt [10]
## 
##    country_txt          city     n
##          <chr>         <chr> <int>
## 1         Iraq       Baghdad   999
## 2   Bangladesh         Dhaka   210
## 3  Afghanistan       Unknown   160
## 4        Libya      Benghazi   150
## 5     Pakistan       Karachi   143
## 6        Yemen          Aden   101
## 7        Egypt         Arish    97
## 8        Yemen         Sanaa    93
## 9      Somalia     Mogadishu    92
## 10       Yemen         Taizz    91
## 11       Yemen       Unknown    91
## 12        Iraq        Ramadi    87
## 13       Syria      Damascus    86
## 14    Pakistan        Quetta    84
## 15       Syria        Aleppo    83
## 16 Afghanistan         Kabul    80
## 17       Egypt Sheikh Zuweid    74
## 18     Burundi     Bujumbura    73
## 19       Libya         Sirte    69
## 20        Iraq        Madain    65

Baghdad was the most dangerous city in 2015, with approximately 1000 terrorist attacks in one year, but since when it became dangerous?

Baghdad once was a prestigious learning and cultural center. Since the coalition invasion in 2003, it has become one of the most dangerous cities on Earth.

A heatmap of terrorist attack deaths worldwide 2015

## 96 codes from your data successfully matched countries in the map
## 1 codes from your data failed to match with a country code in the map
## 147 codes from the map weren't represented in your data