"The city breathes. It wakes, works, plays, and sleeps—and crime follows every breath with mechanical precision."
If geography tells us where crime happens, time tells us when. And the when is remarkably predictable. Boston's crime patterns follow the circadian rhythm of urban life with almost clockwork regularity.
The Daily Cycle
Crime doesn't occur uniformly throughout the day. Our analysis of 848,051 incidents reveals distinct peaks and valleys that reflect human activity patterns.
The afternoon peak (3-6 PM) coincides with school dismissal, work commutes, and increased pedestrian activity. This is when opportunities for both property crime and violent encounters multiply.
Feature Engineering: Cyclical Time
Raw hour numbers (0-23) create a problem for machine learning: the model doesn't understand that 23:00 and 00:00 are neighbors. We solved this using cyclical encoding with sine and cosine transforms.
# Cyclical encoding for hour feature
import numpy as np
# Transform hour to cyclical features
df['hour_sin'] = np.sin(2 * np.pi * df['hour'] / 24)
df['hour_cos'] = np.cos(2 * np.pi * df['hour'] / 24)
# Now 23:00 and 00:00 have similar values
# hour_sin(23) ≈ -0.259, hour_sin(0) = 0
# hour_cos(23) ≈ 0.966, hour_cos(0) = 1
The cyclical hour encoding (hour_sin) became our third most important feature at 8.9% importance. Without this encoding, the temporal signal would have been weaker and less useful for prediction.
Weekly Patterns
The seven-day cycle shows clear patterns related to work schedules, nightlife, and weekend activities.
| Day | Incident Count | Index | Dominant Crime |
|---|---|---|---|
| Friday | 132,847 | 115 | Larceny |
| Wednesday | 127,223 | 110 | Larceny |
| Thursday | 126,891 | 110 | Larceny |
| Tuesday | 125,109 | 108 | Assault |
| Saturday | 118,442 | 102 | Assault |
| Monday | 116,338 | 101 | Motor Vehicle |
| Sunday | 101,201 | 88 | Assault |
Friday leads in raw numbers, driven largely by property crimes and nightlife-related incidents. However, weekends see a higher proportion of violent crime, particularly assaults in the late-night hours.
Seasonal Variation
Crime follows the seasons. Summer months consistently show elevated incident rates, while winter brings a relative lull.
The COVID Anomaly
The pandemic created a natural experiment in crime patterns. During lockdowns, we observed unprecedented disruptions to normal temporal rhythms.
March-May 2020 saw dramatic drops in street crime but increases in domestic incidents. The usual Friday peak flattened. Night-time crime collapsed. These anomalies provide valuable insights into how urban rhythm drives criminal opportunity.
Time Intelligence for Prediction
Our machine learning models incorporate temporal features at multiple scales:
- Hour of day (cyclical) — 8.9% importance
- Day of week (one-hot encoded) — 3.2% combined
- Month (cyclical) — 2.8% importance
- Year trends — captured in model training
Combined, temporal features account for roughly 15% of model prediction power. While less than geography (50%), time remains essential for accurate forecasting.