tl;dr

NorthStar is an iPhone application that has the potential to revolutionize safety in Berkeley by finding the safest and fastest routes from point A to point B. We are disgusted by the amount of violence and crime that befalls members of our community, and we have taken action by constructing a tool that leverages police data and state records to guide users through the city as safely as possible.

NorthStar isn't on the AppStore yet, but you can explore our work by viewing the demo video and screenshots (above), our repositories on Github (linked below), or by contacting hbhargava@berkeley.edu to request an invite to test NorthStar via TestFlight.

Inspiration

With the recent wave of crimes in and around UC Berkeley, many students feel like that they are not safe on their own campus. As college students however, walking back home after a long night in the library or after a night out with friends is inevitable. From muggings to sexual assaults, crime around college campuses is reaching pandemic severity. We believe that an application that provides safe and fast routes will help ensure the safety of travellers. Upon realizing that no usable or well-maintained applications exist in this space, we decided to use Cal Hacks 3.0 as an opportunity to make an impact on the safety of our fellow students and community members. Similar to how the north star served as a navigation tool for people in the past, we hope that NorthStar will serve students at Berkeley and, in time, all over the world.

What it does

This iOS app allows a user to input their current location (or other starting position) and destination, calculates the shortest path, the safest path, and an optimized (a combination of safe and short) path. These paths are visualized on a map, and the user can choose the option they find most suitable. Finally, the NorthStar provides turn-by-turn navigational instructions to get the user safely from their origin to destinaton.

How we built it

After getting crime data from the Berkeley Police Department and map graph data from OpenStreetMaps, we filtered relevant crimes (e.g., assault, theft, sexual assault), and then quantized the edges into discrete points separated by one meter intervals and sum risk values for each individual point based on a Gaussian density function over all crimes that are within 100 meters of the edge to compute a “risk” score for the edge. These edge-risk values are stored in a mySQL database, and subsequently our path optimization algorithm uses these values to solve a biobjective optimization problem with cumulative path risk and path length as variables.

Challenges we ran into

The first challenge was organizing tasks within our team such that they matched the technical experience and skills of our team members. Each team member came in with different levels of expertise, but we were all willing to learn quickly to adapt to the tools and skills required by our project. We also underestimated the amount of time required to set up our database and servers and ended up spending a significant amount of time configuring infrastructure, leaving less time to work on the UI and other features that we were planning on implementing.

In addition, solving the biobjective optimization problem necessitated by this project was nontrivial. There is relatively little literature on this sort of problem, and our expertise in graph and probability theory was tested. In the end, we were able to develop an effective solution that appears to be quite effective. Our team collaborated very effectively, and the diverse mathematical, statistical, and computer scientific knowledge each individual brought to the table was critical to our success.

Accomplishments that we're proud of

We are proud of the fact that after 30 hours of work, we have a working product. A tangible app that actually serves a useful purpose - what more can one ask for?

A lot of technical skill went into this project. With over 20,000 edges in our graph and 6000 crimes to take into consideration, we are very proud of the way we efficiently computed risk score, especially at a 1 meter granularity. We are proud of the fact that we didn’t stick to our comfort zones but went forward with an idea.

What we learned

We learned to use tools such as Flask and MySQL as well as front end UI/UX design. We also learned how use our individual talents together to solve problems much more difficult than any one of us could have accomplished alone.

IN addition, we learned how to build something from start to end (planning, collecting data, creating a server, creating a solid back end and creating a usable front-end). This requires a lot of patience and hard work.

What's next for NorthStar

To begin with, we would like to add more features to the app that would improve the user experience. We are thinking of a panic button that connects to emergency services or close friends. A buddy system would also be useful, where the app would send geo-location updates to one or two friends every minute or so. We would also like implement a “I’m home” feature that would notify friends when the user has reached home safely.

An important determinant of the success of an app is scalability. We would like to turn this into a larger endeavor like a start-up, by gaining a large user-base and having colleges across the U.S. as well as people who live in cities with high rates of crime to utilize our app. In order for us achieve this, we need to improve the efficiency of our data collection (add sources) and server (one that can hold more bandwidth). We also hope to continue improving our routing algorithm and making it more robust so that the paths we provide the user are as reliable as possible.

We would eventually like to pivot into a more data-driven crime prediction role. We can use our user data and experience in the industry to perform extensive data driven research and implement machine learning algorithms to predict criminal activity and safety. We would like to offer SaaS (Software as a Service) to mobile developers, security companies, police departments and urban planners. This project is easily scalable to an international level and could deeply impact the life of millions of people.

Share this project:
×

Updates