Past 5 Years of Toronto Robberies

By: Niraginy Theivendram

Geovisualization Project, SA 8905, Fall 2020

Introduction

Over the past years, Toronto has experienced an increase in robbery and assault. Robbery is the act of stealing from a person using violence or threats of violence. According to the Toronto Police Services, in the past 5 years there has been over 20, 000 police reported robberies in the city. Toronto Police provides various datasets online to the public with various types of crime information across the City of Toronto. This dataset can be used to visualize and analyze the distribution of Toronto crime. There have been many types of crime that Toronto has experienced over the years, however, this interactive dashboard will look at the different types of robberies in Toronto. With Tableau’s interactive time series map, you will be able to visualize the distribution of Toronto robberies over a span of 5 years.

The following dashboard was produced using Tableau Public, an interactive data visualization and analytics tool. I created a time series map visualizing the different types of robberies that Toronto has experienced over a 5-year span. In addition to the map, there are 3 visuals produced. The pie chart visualizes the percent of total offence type. The other 2 charts allow you to visualize the distribution of each type of offence over a 1-year period based on the count as well as the number of offences per neighbourhood.

Data

The data used for this dashboard was acquired from Toronto Police Services and was downloaded as a shapefile. Toronto Police provides a variety of data types for all types of crime. However, this specific dashboard uses the Robbery 2014 to 2019 dataset. This data was a point file consisting of information about the type of offence, the date it occurred, the date it was reported, and the neighbourhood it happened in.

The following information will go through the steps in producing this dashboard in Tableau. The overall dashboard can be viewed on Tableau Public here.

Method

Importing Data

Before getting starting on the visuals, we will first need to import the data we are working with. Tableau works with a wide range of data types. Since I will be using a shapefile, we can import this data as a ‘Spatial file’ in the Connect section. This file will then open up in the Data Source tab where you will be able to sort and edit your data. The Sheet tab can then be used to individually create maps and charts which will then be rearranged into a dashboard using the Dashboard tab.

Creating the Time Series Map

First, we will be creating a time series map from 2014 to 2019, showing the number of robberies in Toronto as a dot density map. Go into the Sheet tab to create the first map. This dataset provides longitude and latitude coordinates for each robbery represented by a point. To create a dot density map, we will drag the ‘Longitude’ field into the Columns tab and the ‘Latitude’ field into the Rows tab. Right-click on the Longitude and Latitude fields and make sure they are set as a Dimension in order to produce this dot density map.

To make this a time series map, we will drag the field ‘Reported Year’ into the Pages card. This will produce a time slider which enables you to view the dot density map at any chosen reported year.

The time slider will allow you to view the map in a loop by adjusting the speed of the animation. This could be controlled by any user just by using the features on the legend.

Finally, in the upper-right Show Me tab, select the symbol map icon to produce your base map.

The Marks card provides you with control over how the data is displayed in the view. The options on the card allows you to change the level of detail as well as the appearance. For this map, we would like to display the Offence type, Neighbourhood, Reported Date, and Division of each Robbery point on the map. Make sure these fields are dragged into the Marks card as a Detail, so that it doesn’t affect the headers built by the fields on the Columns and Rows. The attributes that appear when you hover over one or more marks in the view can be controlled in the Tooltips tab. You can modify which fields to include in the tooltip and how to display it.

Creating Graphics and Visuals

Next, we will create a graph displaying the number of robberies by offence type for each month over the entire time series.

To produce this graph, drag and drop the ‘Reported Month’ field into the Columns tab and the ‘Offence’ field into the Rows tab. Make sure both fields are set as a Dimension.

Since this will also be a part of the time series, drag and drop the ‘Reported Year’ field into the Pages card.

Next, we add the ‘Offence’ field into the Marks card to quantify how many robberies are attributed to each type of offence. Since we want the number of offences, right-click on the field and under Measure, click Count. This will display the number of offences and will also enable you to make the symbol proportional to the number of offences by adding the field as a Size. As mentioned before, the attributes shown when a user hovers over a feature can be edited under the tooltip.

Next, we will create the pie chart. This will display the percent of each offence type based on the total count.

Since this is also part of the time series, we will add the ‘Reported Year’ field in the Pages card. Next to represent the count of offences as a pie chart we will add the ‘Offence’ field as a count into the Marks card. Change the type to Angle or click ‘Pie Chart’ in the Show Me tab to create a pie chart.

We also want the percentage of the number of offences, right-click on the field and go to ‘Quick Table Calculation’ where you will be able to make the Percent of Total calculation. This will then display the percent of each offence when you hover over the pie chart. Add another ‘Offence’ field to the Marks card to control the colour scheme of the pie chart.

Next, we will create the chart displaying the number of offences per neighbourhood. This will allow the users to get an understanding of which neighbourhoods experience a high number of robberies.

Similar to the previous visuals, drag and drop the ‘Reported Year’ field into the Pages card to be included into the time series. In the Show Me tab, select horizontal bars and then drag the ‘Neighbourhood’ field into the Marks card as a Detail. Since we want to look at the count of offences per neighbourhood, add the ‘Offence’ field into the Marks card as a Size. This will allow the squares representing the neighbourhoods in the chart to be proportional to the number of robberies that were reported in that location. To control the colours of the square, add another ‘Offence’ field (count) as Colour.

 Creating the Dashboard

Now in the Dashboard tab, all the sheets that were created of the map and charts can now be added onto the dashboard using the toolbar on the left by simply dragging each individual sheet into the dashboard pane. This toolbar can also be used to change the size of the dashboard. You can then save the created dashboard which will be published to an online public portal.

Limitations and Future Works

This dashboard is produced using police reported data which provides only one particular view of the nature and extent of the robbery. One of the major factors that can influence the police reported crime rate is the willingness of the public to report a crime to the police. It is not certain that every robbery that has happened in Toronto has been reported. Over the years, it has been proven by criminologists that many crimes never come to attention to the police because the incident was not considered important enough.

Being a time series dashboard, examining the distribution of robberies over a larger time period dating back to the late 1900s or early 2000s would further our understanding of the distribution of robberies. The 5-year time series doesn’t show much of a difference in the patterns that were determined. However, Toronto Police only provides data for the last 5 years, dating from 2014-2019, making it impossible to look at a larger time period.

To expand further on this project in the future, it would be interesting to look at potential factors relevant to robbery and assault. Given that this is a quantitative analysis, it cannot take into account of all potential factors of relevance to crime due to the limitation of data availability and challenges in their quantification. This model is limited in that it cannot consider the importance of many socio-demographic changes in Canadian society that is not available in a statistical time series. For the future of this project, exploring the statistical relationship between crime patterns and the demographic and economic changes would allow us to conclude with better assumptions about Toronto crime patterns today.