This project was made by Jyram Sharma and Gurneet Bhatia at jacobsHack 2018. The project is an Android app built primarily using Andoid Studio with backend and API support from the Google Cloud platform. We used the Maps API for displaying graphics to the user and the Directions API for finding multiple routes between two points. We also used an API provided by the UK policeforce (government data) called 'crime-street' which returned to us the details regarding crimes that occured around a position we provided to it within a certain timeframe. The primary purpose of the application is to find the safest path between two places such that the likeliness of crime occuring on the path (based on the crime stats data) would be the least. Due to the limitations of the databases available to us, our application would only work in London at the moment. Therefore, for the purposes of testing, we have set the origin location as Buckingham Palace. The application starts by displaying a blank map to the user with a search bar at the top. They can search for the place that they want to using this bar, and we would get the possible paths between their current location and the location provided using the Directions API. The API suggests multiple paths to us, and we find the safest one by passing each of the waypoints of each path through the UK Police API to develop a crime rating for the path. The path with least crime rating is the one that we then output to the user. During the hackathon, one of the primary limitations we faced was that within the given timeframe we were unable to make our algorithm robust and efficient. At the moment, it gives the route that it is fairly certain is the safest for the user to use and due to the large volume of data returned by the UK (100s, even 1000s in some cases, of crimes reported along each suggested route), parsing it takes a considerable amount of time. Through our testing we found that it can take anywhere between 2 and 7 minutes depending on the neighbourhoods the routes pass through, their length, etc. To calculate the crime rating of a path, we retreived data from the 'crime-street' API for each of the waypoints on each of the suggested paths (which we had from the Directions API). The API returned a lot of data to us that included the category of the crime (like burglary, public disorder, drugs, etc.) along with the date and exact coordinates of the occurence. We then rated each of the offences out of 10 so that we could perceive just how serious each offence was how much it should affect the overall crime rating of the path. We then added the individual crime ratings for each of the offences that happened around the waypoints to compute the overall crime rating. We also had to write code to avoid the same offence being counted twice since it could have been in the vicinity of multiple points along the same path. After having done this for each of the suggested paths, we returned the path with the lowest crime rating to the map for it to be displayed to the user.
If we had more time to work on this project, we would certainly work on the efficiency aspect of it by maybe compressing the data or just not parsing data that is not neccessarily relevant to us anymore. We would also set up a user based ranking system which would allow users who have used a certain route to rate how safe they felt. While we care about what our users think, we feel that the data provided by the UK Police crime stats would be reliable and therefore a weighting of 75% would be given to the statistical data and 25% to the user feedback.