CrimeRadar is using machine learning to predict crime in Rio

The software carves the city into sectors of 250 square metres and predicts crimes based on time and place

It may sound like something from the Minority Report, but this app can predict where crimes will take place. The software, called CrimeRadar, has just launched its prototype in the Olympic host city of Rio de Janeiro.

The app uses advanced machine learning to predict crime rates in the city's neighbourhoods at different times of the day and night.

The Olympic Games have, arguably, exposed crime levels in Rio de Janeiro to a wider audience. A string of high profile robberies, allegedly including members of the US swim team; Australian athletes; and even the Brazilian government's head of security for events falling prey to criminals, have been reported.

"Our recent work shows that roughly 32 of the 50 most dangerous cities in the world (as measured by homicide rates) are in Brazil," Robert Muggah, research director at The Igarapé Institute, a think tank behind the app, told WIRED.

"Most Brazilians – 81 per cent in a 2015 poll - fear that they will become a victim of homicide,” he says. 58,000 homicides happened in Brazil in 2014, one watchdog has claimed.

Muggah explained that while the situation in Rio has improved over the last decade, with a 65 per cent reduction in violent crime thanks to "pacification police units", it’s still volatile.

“Since 2014, rates have been creeping back up – with homicide, property theft and police killings on the rise,” he says.

Muggah explained that contrary to popular belief, crime isn’t always concentrated in poor areas, with wealthy parts of the city affected too, so residents and visitors need information to avoid more dangerous parts of the city.

“We developed CrimeRadar to help trigger and drive a more data-driven and evidence-based debate on public security in Rio de Janeiro,” he said.

“The idea is to create a reliable source of information rather than rely on episodic news reports which contribute to a sense of hysteria. Our goal is to make what are already publicly available statistics accessible and actionable for citizens.”

The first version of the app, which runs on phones and desktop browsers, can help people navigate Rio de Janeiro using a simple map that shows crime hotspots on a colour-coded map.

It was developed by The Igarapé Institute together with software company Via Science and investment firm Mosaico Internet, and draws on five years of crime data – 14 million crimes – collected by the Rio de Janeiro state police and shared by the Institute for Public Security.

Such data has only become available to the public recently and CrimeRadar puts it into a form that’s easily interpreted. When opened, the app shows a map, using Google Earth API, with options to view future or past data on it.

“If the user selects ‘future’ then they will be shown an interactive and high resolution map of metropolitan Rio with the distribution of crime risks from green (lower probability) to red (higher probability),” Muggah explained.

“At the bottom of the screen, users can swipe left or right to check the risks of their location – or a location that they select – to assess risks at different times of the day or week.”

Users who choose to view past crimes are shown a different map of Rio, displaying four types of crime: homicide, police killing, violent assault and robbery and can filter it by the type of crime.

The app is able to assess the risk of crime in different parts of the city by finding patterns in incidents, locations and time, using advanced algorithms. It does this by processing GPS coordinates as well as a specific time and date.

The metropolitan area of the city is carved up into sectors of 250 square metres, with those containing lakes and forests disregarded.

"The app filters these sectors by their severity level to create separate models,” Colin Gounden, CEO of Via Science told WIRED. "We then weight the events by sector population and adjacent sectors and time periods before ultimately producing the sector score."

The score is the relative probability of a crime in each sector and at different times, and is summarised on a scale of one to ten, where one is low risk and ten is high risk, in micro-areas of the city.

The final output from the algorithm groups the hundreds of thousands of scores for each sector into deciles to create the simplified and colour coded risk rating that users of the app can see on a map.

The app shows three different categories of crime risk, including high risk crimes such as homicide, assault, kidnap, rape and robbery using guns; medium risk crimes, such as theft; and all crimes in a sector, regardless of their severity.

“Our model takes into account the seasonality of events, such as the time of day and day of the week, and filters out data points that are not statistically significant,” Gounden explained.

“We use our microservices architecture, Focus, to analyse the data, which covers five years.”

Muggah said: "CrimeRadar is one example of ways in which citizens can be empowered to improve their own safety."

He explained police could use the tool as one of many sources they use to guide their approach to "proximity policing,” including a new geo-mapping tool called ISP Geo.

“The revolution in police is really a revolution in information. Smarter, more intelligent, policing is really about data-driven and evidence-based strategies emphasising prevention,” he added.

The makers of the app said it overcomes three major challenges when it comes to tracking crime – it’s able to predict the seasonality of crime, key locations where crime occurs, and display results in a simple manner.

“CrimeRadar offers an accurate overview of crime intensity depending on the time of day and day of the week,” Gounden said.

The app also tries to stop specific areas gaining a particularly bad reputation, so locations of future crime are not pinpointed too precisely. Instead, it shows results in 250m by 250m sectors.

The app doesn’t share data about specific criminals or victims either, however it does include a number of filters that let users look up crime risks at large tourist sites, parks and some poor areas of the city. “This will provide users who are unfamiliar with Rio a better sense of the lay of the land,” Muggah said.

CrimeRadar is part of a wider movement to make big data more accessible and useful.

The first version of the app launched this week and there are already plans to update it, to cover favelas, for example. Currently, CrimeRadar doesn’t cover particularly poor neighbourhoods of the city because there is little crime data about them available.

Muggah said crimes often go unreported in poor areas of the city, perhaps because for he threat of powerful drug trafficking gangs.

“Large favelas like Complexo do Alemao, Maré and Rocinha with hundreds of thousands of people are effectively dominated by gangs and experience episodic violence, often at a very high level of intensity,” he explained. “The data gathered from these areas is often unreliable and subject to high levels of volatility. As such, we have decided not to include it in vs1 of CrimeRadar.”

Gounden, cautioned: “While we would like to fill in current data gaps – such as the favelas – our ability to do so depends on improvements to the quality of data collection and reporting.” He ruled out relying on crowd-sourced data, because it could result in misinformation and impact on the app’s reliability.

The team aims to work with public security agencies to improve reporting and in turn, the app. Future iterations of CrimeRadar may have a function that makes a user’s phone vibrate when they are entering a high crime risk area and link up with other crime monitoring tools.

Muggah said: “We are in dialogue with a number of public and non-governmental partners about adding additional data layers.”

As well as updating the original app, there are also plans to roll out similar apps elsewhere, providing the necessary crime data is available. Gounden revealed the team is in discussions with public agencies about similar apps, with Muggah adding they are exploring opportunities in Latin America and the US.

Muggah explained the software can be applied in virtually any setting as long as there is three years worth of data available in enough details to form an accurate map.

He said: “We very much see CrimeRadar as a platform that can be rapidly expanded to other cities and states in Brazil and around the world. It is part and parcel of a wider ‘open data’ and ‘open government’ revolution.

“More to the point, it is a way to help citizens take action to promote their own security and safety rather than relying exclusively on the police."

This article was originally published by WIRED UK