!Safe'

A product of Ford GoDetroit.

By Ali Behlalah, Budi Ryan and Cooper Pellaton

Table of Contents

Overview

!Safe v2.0. We were posed a problem by both Ford and Devpost, that the city of Detroit is not currently safe to travel in for many of it's residents, and that there is a potential to enable better transit through technology, but it doesn't currently exist. Taking this to mind as well as the data sets that were provided to us, we created an application to solve this problem.

Welcome !Safe, a platform to best help you get from Point A --> Point B in the city of Detroit.

Explanation

Detroit is not a safe city, we all know this, so we began by writing some ML models to help calculate the apparent risk and danger associated with travelling along a certain route. These models are composed with a number of data sets, but at the highest level we mix user related stastics with city crime data, weather data, traffic data, etc. to determine what the potential downsides of travelling amongst a certain path are.

To effecitvely serve the user, when they input a source and destination in our application we run a probability of this inforamtion through our model and then use this to inform how we will suggest the user to travel. For instance, if there is a significantly high likelihood of crime occuring on a certain street, yet that is the route suggested by Google Maps, we will deviate and reroute the user so that their safety is guaranteed.

Furthermore, we support a myriad of travel types including Public and Non-Public transport. This means that we can tell you how late your Detroit, public-run, bus will be and then suggest to you a safe place to wait just as well as we can suggest to you the safest & most efficient way to bike || walk || drive through Detroit.

Description

The intent of this application is to aid the denizens of Detroit by offering them realtime updates and directions while travelling. Our mission is to help a user get from Point A to Point B as quickly as possible while also offering them information about the relative risk and/or safety at any given time.

On this screen a user is prompted to enter her query parameters. The user can either manually enter a start destination, or choose his/her current location. After adding her desired destination they can then choose her optimal means of transporation. In order of presentation (from left to right, top to bottom) the user can choose to take private transit (i.e. a car), take public transportation (i.e. a bus), to walk, or to cycle. The path information is sourced from Google and then queried against our API where we make decisions about how to guide the user and/or adjust her route.

When on a route, the user will be able to see the detail view which presents the user with the map embed of her directions, as well as her relative danger. The application determines the danger of the user on the route by taking data submitted from within the application (provided by other users) and running it through a multi-stage machine learning algorithm that involves a great deal of natural langugae processing to determine the sentiment and meaning of each comment. This dervived data is then used to present the user with her "Danger According to PPL" rating, and the individual data pieces are presented below, where a user can signify the value by upvoting or downvoting and thus have an influence on their respective weight in future uses in our model.

Important to note is that if the user is not currently on a route, they can also still select the Alerts tab from the main view and be presented with the following.

The alerts are run through a process similar to that described above, with the greatest difference being that now the alerts shown are those which are closest in location to the user rather than those on his/her route.

Lastly, is the Watch Me tab which allows the user to share his/her location with others so that her movements, as well as safety/danger ratings, can be watched in real time. The intended use of this application is to allow for someone (possible a loved one) to track a users movements and rest assured that they know how the user is doing.

Setup

We've uploaded an APK to Google Drive so that you can install and test this on your phone. If you can't find the link on DevPost (in the try it out portion) then click here In order to be able to use this application you'll need:

  • An Android phone (running a semi-recent version of Android).
  • An internet connection.
  • A valid cellular connection which can send and receive text messages.

Note that if you only want to demo the WatchMe feature you will not need internet. We've done this purposely because it allows for people without a data plan to still use the application. Beyond this, all other features of the application rely on an internet connection.

API

If the type is POST you are expected to provide x-www-form-urlencoded data in a JSON blob. If the type is GET then obviously, you don't need to do anyting :smile:.

  • /publish: {lat, lon, alert}

    • Publish an alert at the specified position
  • /get: {lat, lon}

    • Fetch the alerts nearby the specified (lat,lon) location
  • /score: {id}

    • Thumbs up to the alert with specified id
  • /danger: {lat, lon, type}

    • type = "a", "p"
    • Returns the danger according to authorities (type == a) or to people (type == p) next to the specified lat,lon location
  • /api/feedback

    • Expects to recieve JSON in the form: {'text': 'Something that you wanted the server to parse'} and will return the output of this text run through the FeedBack NLP algorithm.
Share this project:
×

Updates