Montreal Crime Study

Khaled Fouda
Analytics Vidhya
Published in
6 min readAug 18, 2021

from January 2015 to May 2021

Montreal’s police department has witnessed changes due to the current pandemic and the closing and merging of stations over the last few years. A dataset of criminal acts became available on the open data portal of the city. For each act ,we have its category, the date and time, the geographic location and the police division assigned to it. The dataset covers the time from 01 January 2015 until today and is updated regularly. We wish to analyze the changes in crime trends over the years.

About the dataset

The dataset contains all registered acts of the following six categories:

Fatal Crime . Break and Enter . Mischief . Auto Burglary . Auto Theft . Armed Robbery.

For each act we have:

  1. category
  2. Date, time, and geographic location of its occurrence
  3. The police division assigned to it
The dots account for missing location coordinates.

For this report, we are using acts from the first of January 2015 until the end of May 2021 and that makes a total of 191,611 crimes.

On the other side, this data lack other important categories such as frauds and simple robberies. The 6 categories above account for approximately 35% of the total crime rate and for that we will not be able to generalize our study and we will study each category separately.

Existing Analyses

  • In 2018, analysts at CBC created an animated map of the city showcasing the evolution of crimes from 2015 to 2017. They also studied pattern changes in criminal activity throughout this period.
  • The city of Montreal currently offers an up-to-date interactive visualization of the data.

Exploratory Analysis

  • Some categories are more popular than others. For example, fatal crimes account for 0.1% of the data with only 166 occurrences during the whole period. On the other hand, we had 57,304 auto burglaries.
  • Similarly, some districts have more crimes than others. 14.6% of the crimes happened downtown making it the top district. However, the crime rate (for the given 6 categories) has decreased by 24.6% in 2020 making it a positive change. Moreover, the biggest increase has occurred in the Plateau with a rate of 10% in 2019 and the biggest change overall has occurred in the Mercier-Hochelaga-Maisonneuve with a decrease of 28.4% in 2018.
  • Despite the sudden increase in the plateau in 2019, it decreased again in 2020 by 14.8% making the crime rate in 2020 less than the crime rate in 2018.
  • The crime rate per category has also changed over time. The most notable changes are the decreases in burglaries and armed robberies in 2018 and 2020, and the volatile changes in fatal crimes which were caused by the small number of occurrences.
  • The top 3 crime categories are trending downwards which is a good indicator.

Time-Series Analysis

From this point, each of the categories will be analyzed separately to avoid making wrong conclusions about the population.

If we visually analyzed the time-series plot of each of the categories we will notice that there is a downward trend in all of them. Moreover, we will also notice a seasonality pattern that is repeated every year. Next, we will try to separate both the trends and seasonality patterns.

After applying time-series techniques for the separation (check the GitHub repo at the end for more technical details) we get the following trends and seasonality patterns.

  • As we expected, most of the categories have decreasing patterns except for auto thefts and fatal crimes. It looks that fatal crimes are increasing over time and that auto thefts don’t have a linear trend.
  • We also notice a decrease in the crime rate during the first half of the year with a minimum in February for 4 of the categories and that the rate increases by the end of the year especially during October which is the maximum for 5 of the categories and the second highest in the 6th where the highest in that category (Break and Enter) is November.
  • After estimating the trends and seasonality patterns, we fitted an ARIMA model to the residuals to model the data to be able to predict future changes. Below is our model fit. More details are to be found in the GitHub repo at the end of this report.

A closer look at seasonality patterns

From the previous, analysis we became more interested in seasonality patterns. We created more detailed graphs of seasonality for each of the categories.

  1. Auto Burglary
  • A steady increase in rate from April to October.
  • Peaks in October and achieves the lowest in February.

2. Break and Enter

  • Shows a similar pattern as in auto burglary with the same max and min months.

3. Mischief

  • The rate strictly increases from February until July with the maximum point achieved in July and the minimum in February.
  • Nevertheless, October’s rate is very close to the maximum.

4. Auto Theft

  • The curve is less smooth compared to the other categories.
  • However, October and February still score the highest and lowest rates.

5. Armed Robbery

  • We see an increase from April to October except for June and September.
  • October still scores the highest, however, June scores the lowest.

6. Fatal Crimes

  • There is no clear pattern for fatal crimes.
  • February is one of the months with the higher rates while October is still scoring the highest.
  • April has the least number of fatal crimes.

Summary

  • Auto Burglary had the highest number of total crimes at 29.9%.
  • Fatal crimes had the lowest number of total crimes at 0.1%.
  • Mercier-Hochelaga-Maisonneuve had the highest decrease in total crimes of 26.4% in 2018.
  • The Plateau had the highest increase in total crimes of 10% in 2019
  • The three highest crimes are all trending downwards.
  • Most categories of crimes peak in October and most crimes are at their lowest during winter months (I.e. Jan., Feb., Mar.).
  • While there is a decreasing trend in the number of crimes, both auto theft and fatal crimes exhibit an increasing trend over time.
  • We were able to find a time series model (per category) that fits the data well.

Appendix

  • The Analysis was done mainly in SAS except for data cleaning and preparation in R.
  • source code, data, methodology and graphs can be found in the following GitHub repo

GitHub — khaledfouda/Crimes-in-Montreal

Thank you for taking the time to read the report. Please feel free to leave feedback and suggestions.

--

--

Khaled Fouda
Analytics Vidhya
0 Followers
Writer for

2022 Concordia University graduate specializing in Statistics | Experience with data analysis, machine learning, and data visualization