Introduction

Hoodly AI is a smart walking assistant that we built with women in mind to choose safer walking routes, specifically in Berkeley. It is more than just a map, but also a personal safety advisor. We utilized a combination of mapping, routing algorithms, and custom safety scoring systems

What we believe

Walking home at night can be a scary experience, especially in cities with higher crime rates… We truly believe that safety shouldn’t be a premium feature and should be accessible for everyone to use. One important feature is the community driven design where they can not just benefit from the system but also contribute to it

Solution

When making this app, we had 3 core goals in mind. Visual, interactive, and accessible platform for navigating Berkeley on foot. We were able to do this by implementing safety scores, community-based reporting, and women’s safety. Most apps optimize speed/traffic

Safety Score

Core part of the application where we can quantity the relative safety of any walking route. Safety can have many complex factors, so creating this scoring system allows for simplicity and clear guidance when walking somewhere new or late at night. We included user preferences where they users are able to adjust route recommendations based on the time of day and priority toggers.

User interface

Our goal for the UI was to create something that’s not just functional but also intuitive, accessible, and focused on user peace of mind. At the top of the interface, we included dropdown menus for selecting start and destination points. There’s also a time of day selector which tailors the route recommendations based on the lighting and activity level expected during that time.

Interactive Map Display

We use a Folium-powered interactive map to show the route. The map highlights key elements like start and end points with colored markers and polylines showing the route, color-coded based on safety score and display of safety score, estimated distance, and walking time beneath the map.

How we built it

We began by using OSMnx, a python package that lets us download real-world street networks from OpenStreetMap. We mainly focused on Berkeley and used OSMnx to convert the city’s streets into a graph of nodes and edges. We used NetworkX, a powerful graph theory library in Python to compute the shortest walking paths between selected locations. Each user-selected point is mapped to the nearest node using scikit-learn’s cKDTree which helps us efficiently match coordinates to our street graph. We created a set of 13 fixed locations around Berkeley and manually assigned a safety score from 0 to 10, based on various factors like lighting, public familiarity, and foot traffic. To visual the routes, we used Folium, a python wrapped which let us render interactive maps directly in the browser. All of this was tied beautifully together using Streamlit web app, which we used to built the front-end interface. Using Streamlit we were able to create dropdowns, buttons, adjustments in time preferences. We took a city’s street network, applied graph theory and safety logic and turned it into an interactive, real-time tool.

Challenges

Our initial goal was to integrate live crime data to adjust safety scores, however, a lot of public safety APIs required special access and were not accessible. In order to work around this, we used fixed safety scores assigned manually to 13 key locations in Berkeley based on perceived safety and known local data. Another issue we ran into was deploying Streamlit Cloud. Packages like OSMnx and scikit-learn had complex dependencies that weren’t always compatible with the Streamlit runtime. We had to debug version conflicts and test locally several times to make deployment stable. Overall every roadblock pushed us to think creatively and adapt quickly. This led to a fully deployed, working prototypes.

Future

In the future, we hope to integrate live crime data through open data APIs or police department feeds. We want to allows users to submit real-time safety reports and have these appear on the map and influence safety scores. This would strengthen the foundation behind our community-powered safety network. In addition to walking routes, we hope to support multi-modal travel combining walking routes with BART, bus lines, and even ride shares. Right now, Hoodly is a web app but we envision a fully featured mobile app built with React Native or Flutter. These enhancements can turn this simple web app and transform it into more than just a routing tool but also an adaptive personal safety companion.

Built With

  • anthropic
  • claude
  • geopandas
  • geopy
  • networkx
  • osmnx
  • python
Share this project:

Updates