Safe Maps is a web application that places citizens’ safety at the heart of urban design.

By analyzing crime and spatial data, Safe Maps helps build an understanding of the relationship between safety and the urban environment. It then uses machine learning to predict safety scores based on street features, aiding citizens in safely navigating the city and helping designers and planners make informed decisions regarding the safety implications of urban projects. Future developments of the app include allowing citizens to rate the routes they have taken and report any incidents, as well as integrating large language models (LLMs) to provide design suggestions to enhance safety, empowering both citizens and planners to make small, impactful changes in the urban fabric.

I. PROBLEM DEFINITION

Safety in the City: A Collective Priority

Proposed Solution: Safe Maps

II. DATA COLLECTION: London, United Kingdom, as Case Study

Defining Safety in the Urban Environment

Due to time constraints and the difficulty of collecting qualitative data, only readily-available crime data was considered in this project to measure and analyze safety within the city and understand its correlation with features of the urban environment. In particular, the focus was placed on crimes committed against the person, which were divided into the four categories below.

Selected Features: By Scale

Multiple datasets were gathered to form 30 features across the different scales of London – neighborhood, building, street and point.

Creating the Dataset of Features: Methodology

Spatial operations and arithmetic calculations were performed to transform the geographic data of the city into a tabular dataset that can be used for data analysis and training machine learning models.

III. DATA ANALYSIS

Image Segmentation

Image data was cross-referenced with crime data to create a dataset where images were categorized as ‘hotspots’ or ‘safe spots’ based on the frequency of crimes occurring in the respective street segments that the images belonged to. Image segmentation techniques were then employed to investigate the relationship between safety and specific urban features by calculating and comparing the area these features occupied within the images of hotspots versus safe spots.

Correlation Matrix

For the dataset of 30 features, correlation matrices and feature importance algorithms from tree-based machine learning models were employed to identify which urban, demographic, building, or street features had the most significant impact on safety in the city. This analysis also revealed key relationships between specific features and certain types of crime. While the findings generally align with existing literature, it is important to note that the data used for this study was not exhaustive due to limited access to certain datasets.

Correlation Between Safety and Urban Features: Preliminary Findings

IV. MACHINE LEARNING

Goal and Framework

After analyzing the correlations within the data, the final dataset was refined to include only the most important variables. The goal of Safe Maps is to not only understand the relationship between safety and spatial features but also to be able to utilize that understanding to predict the level of safety in streets lacking crime data or in areas where spatial features are being modified by new developments, potentially impacting safety levels.

Thus, machine learning was employed to predict the level of safety of a street (output) based on its features (input). As illustrated in earlier diagrams, the street features used to predict safety included information such as the types of buildings on the street, the demographic data of the neighborhood the street is in, the presence of public transport stations on that street, whether that street is lit or not, etc.

Street Scoring System: Safety Intervals

Safety intervals were established based on crime frequency on each street segment. Initial attempts to train machine learning models to predict the exact number of crimes revealed that using a safety interval score provided superior model performance and offered a more practical, actionable measure. This interval-based approach is more intuitive for designers, planners and government officials when assessing and making decisions about urban developments or proposals, allowing them to better understand and address potential safety impacts.

Machine Learning Models: Testing

Different classification and regression machine learning models were tested. The ones in bold performed the best within each category.

Selected ML Model Performance: Confusion Matrices

The Gradient Boosting Classifier model was selected, as it performed best in predicting outliers – in this case: crime hotspots – with 100% correct accuracy and recall. Outliers are particularly important in the context of safety because crime hotspots represent the most dangerous streets of the city, and are thus a priority to accurately identify and predict by the model. The below confusion matrices summarize the performance of the selected model.

AI Safety Predictor: Use Cases

V. ROUTING

Safe Maps Layers: from Data Collection to Safe Routing

Street Segment Scoring and Matrix

Routing Algorithms: Comparison

Safe Routing: by User Profile

VI. UX / UI

Disclaimer: Safe Maps only hopes to contribute citizen’s safety within the urban environment but unfortunately does not solves to the very complex, multilayered and systemic issue of safety. With that being said, we truly believe that with access to the right data and resources, this application can become a reality and can constitute a valuable addition to citizen’s sense of safety as they go about their daily lives within the urban fabric of their cities.