text_html_output_1.png
import pandas as pd

import warnings

import pandas as pd
import warnings
import os
import numpy as np
import folium
from folium import plugins
from sklearn.preprocessing import MinMaxScaler
from copy import deepcopy
import math
import time
from sklearn.cluster import AgglomerativeClustering
from sklearn import metrics
import matplotlib.pyplot as plt
from sklearn.cluster import KMeans
from sklearn.cluster import DBSCAN
from sklearn import mixture
warnings.filterwarnings('ignore')
pd.set_option('display.max_columns', None)
pd.set_option('display.max_rows', None)

all_data = pd.read_csv('../input/globalterrorismdb_0718dist.csv', encoding='ISO-8859-1')

all_data = all_data[['eventid', 'iyear', 'imonth', 'iday', 'extended', 'country', 'region', 'vicinity', 'latitude', 'longitude', 'specificity', 'crit1', 'crit2', 'crit3', 'doubtterr', 'multiple', 'attacktype1', 'success', 'suicide', 'weaptype1', 'targtype1', 'nkill', 'nkillter', 'nwound', 'nwoundte', 'property', 'propextent', 'ishostkid', 'ransom', 'INT_LOG', 'INT_IDEO', 'INT_MISC', 'INT_ANY']]

all_data = all_data.dropna(subset=['latitude'])
all_data = all_data.dropna(subset=['longitude'])

all_data.shape