6/11/2019

Getting the data from CivicApps

The crime incident datasets for 2012, 2013 and 2014 were downloaded from the CivicApps Website, a local data repository.

These data contained 10 variables, of which the Date, Time and Major Offense Type variables were be used. The three year span contained a total of 186,555 observations.

Time Maps

I was inspired to create a time map after reading the article “Time Maps: Visualizing Discrete Events Across Many Timescales” by Max Watson. The article lays out the concept of breaking the timeseries of events into a pair of duration values representing the amount of time since the last event and the amount of time until the next.

This mapping is interesting because it exposes the variation in the frequency of an event - if an event occurs at regular intervals it will tend towards the diagonal (x = y). If X represents the time before an event, then those points below the diagonal represent events where the time between events is decreasing (event frequency is speeding up). Above the diagonal represent event frequency decreasing.

Calculating the time differences

The time differences were calculated by subsetting the rows by crime (Major Offense Type) and subtracting the time of the previous event. The difference vector was created by appending a final time (“2014-12-31 23:59:59 UTC”) to the vector of event times and subtracting a vector prepended by a zero time vector (“2012-01-01 00:00:00 UTC”). The TimeBefore an event is the difference vector with the last value removed, while the TimeAfter an event is the difference vector with the first value removed.

This was also calculated for each crime individually.

All Crimes, Linear Scaling

All Crimes, Log Scaling

Analyzing individual crimes

Both the linear and log scaled time maps of all crimes are too heavily skewed towards zero to be able to determine a meaningful result. The following four charts examine the log-time maps for four different crimes: Motor Vehicle Theft, Fraud, Aggravated Assault and Driving under the Influence of Intoxicants (DUII).

Motor Vehicle Theft

Fraud Violations

Aggravated Assault

DUII

Conclusion

To conclude - this method of pairing offsets before and after an event is an interesting way to examine how events cluster in the time domain. For instance, DUII and Fraud both cluster as in the 12 hour to 1 day band and a >6 hour cluster while Aggravated Assault and Motor Vehicle Theft did not.