Based on the denver police data, I use python to analyze the data by using pandas. Firstly, I change the date to daytime object, to get the index of weekdays. Then, I simply use enumerate function to count the arrest made category, showing as the weekdays. The code can be found here. I stored all true value of arrest made of the data as the list, and count the numbers. Finally, I used the Altair to render the image and embed in the web page.
import pandas as pd
data = pd.read_csv('denver-1.nov.csv')
data['days'] = pd.to_datetime(data['date']).map(lambda x: x.weekday())
list1 = []
for n,i in enumerate(data['arrest_made']):
if i==True:
list1.append(data.loc[n,'days'])
for i in range(7):
print(i, list1.count(i))
Based on the chart, we can see that on Wednesday and Thursday, the total stop records and arrests made are significantly higher than on other days. That probably because more people go outside on certain days or the police are especially more outside on those days, or the lack of data since it only has a month record. Therefore, in the future, I want to compare several other data, such as more police data in different years, the routine that people usually go outside in a week, and to combine the arrest made, citation issued, warning issued in one chart as a different legend, to see the pattern clearly. Also, I want to ask how the stops might look like as a geo graph. Because using the geodata to show the result in a map may be easier for a reader to understand and might avoid some streets on certain days.