Inspiration
We wanted to help people feel confident naviating in unfamiliar parts of town at night. Too many of our friends and family have felt scared at night, this tool aims to direct them around where trouble has occured.
What it does
In its current state, the application is a map, where a heatmap of criminal activity is overlaid. Users can click on points to see details powering the heatmap. Users can now see at a glance where they could go to expect a smoother journey.
How we built it
Using React with Vite in TypeScript for the frontend, and django for the backend. The map is powered by Leaflet.
Challenges we ran into
The data was not perfect, notably, there were many duplicates. Furthermore, the large number of markers had a significant impact on performance.
To tackle these issues, first, duplicates where clustered by location, and a new calculated property was introduced into the database, when a duplicate is encountered, then the count property is incremented. This count property sets the intensity of the point for the heatmap.
To further improve performance, a two-fold optimisation was implemented. Firstly, markers which are not visible are not rendered. Secondly, if too many markers are visible, then they are all hidden and the user is advised to zoom in.
Accomplishments that we're proud of
My first project in React, so very happy to learn about it. Jake was able to use the OpenStreetMap API to extract highway features and perform custom path-finding with customised weights on edges, this looked very promising, but unfortunately time ran out.
What we learned
We have all had a fantastic opportunity to develop our programming skills, notably TypeScript, Python (and Django) as well as React. We have also had to deal with large datasets (such as the London Crime dataset)
What's next for SafeWay - IM06
We were very sad that time ran out and we were unable to implement the natural evolution of the app, a pathfinding algorithm taking into account the safety of various routes. The intention was to give each crime a radius, say 100m, then creating a danger parameter for each path, which defaults to the length of the path, but is multiplied given how many crimes are in the area.
Using something such as Dijkstra's algorithm, minimising the danger parameter, we would obtain a route that is the best compromise between speed and safety. The multiplicative factor would be modified to fine-tune this balance.
Log in or sign up for Devpost to join the conversation.