-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTheft_LGCP.py
34 lines (25 loc) · 937 Bytes
/
Theft_LGCP.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import pandas as pd
import math
import matplotlib
import numpy as np
import functions as fn
import scipy
import scipy.special as scispec
import scipy.optimize as scopt
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
"""Clean up data set from Chicago Crime Data - have to import directly from csv"""
"""Theft Crime in Chicago"""
theft_df = pd.read_csv('Theft_Clean.csv') # generates dataframe from csv - zika data
year2017 = theft_df['Year'] == 2017 # set boolean variable for after 2008
half_year_point = theft_df['Date']
theft_df = theft_df[year2017]
theft_date = theft_df.values[:, 0]
theft_x = theft_df.values[:, 2]
theft_y = theft_df.values[:, 3]
theft_fig = plt.figure()
theft_fig.canvas.set_window_title('Chicago Theft Locations')
theft_spread = theft_fig.add_subplot(111)
theft_spread.scatter(theft_x, theft_y, color='black', marker='.', s=0.0001)
"""Create Histogram"""