Inspiration

We were inspired by the theme of smart cities. It sparked the idea to design an app around safety, especially on campus. As students who commute to and from campus, often having to walk a few kilometers a day, and late at night, it can seem pretty scary. Especially with the rise of crime, particularly in the GTA, over the last couple of years. According to Stats Canada, Toronto alone has seen over 15% increase in crime since 2020, this is 3x the national average, and as visible minorities, the rise in hate crimes concerns us.

Many students attend universities that require them to travel off-campus property to reach their classes, and off-campus areas may not have the same security precautions or patrols that occur on the campus property day to day.

As students, we are all too familiar with taking precautions, which can include being careful about the time we travel at, as well as the routes we take, to avoid random acts of violence, and rises in hate crime against young and old people alike, which is why we created Urban Guardian. We created an Urban Guardian with the hopes of making students feel that they are doing the best they can as an individual in taking precautions against violent crime when taking the best route around Toronto and especially to their classes. So not only do students feel safer, but we hope to actually protect students throughout their semesters and the residents of urban cities throughout their daily lives as well.

We noticed that this is a problem that everyone has, and is always subconsciously thinking about “Is it safe to travel at this time? And if so, where should I go?”. Apps like Google Maps and Waze prioritize time and speed, but no app prioritizes the safety of the individual, especially of young students who are at risk as they are more likely to walk instead of drive, so Urban Guardian was the best solution.

What it does

Urban Guardian determines the safest route for any given path by analyzing and enhancing the route recommendations from Google's Directions API. Using our personal algorithm, each route is scored based on previous crimes occurring in that area, based on at least one month of previous crime data in Toronto. The user can input any starting point and destination to receive the best route there is in terms of personal safety and early arrival.

Users can sign up and upload their timetable, then Urban Guardian will automatically allow the user to find the safest route from their current location to any desired class from the current date. If the user does not wish to base their journey on their timetable, they have the ability to find the safest route to and from any location in Toronto.

As our primary demographic is university students, we allowed for the seamless integration of your acorn timetable into your UrbanGuardian account when you sign up. There, you’ll have your schedule saved, and Urban Guardian, based on what day it is, can quickly list your classes and automatically find the location of your class, where it can seamlessly provide you with the safest route to class with the touch of a button, and no need to hassle and match the building code to its address, as UrbanGuardian will automatically do that from the timetable you provided. Finally, With our secure login system, your daily whereabouts to and from campus are kept safe

How we built it

We built Urban Guardian using Python and an array of libraries, APIs, and data. First, we collected crime data from the Toronto Police for the last 7 years. This data includes the time the crime occurred, where it occurred, and what kind of crime it was. We cleaned this data to provide us with the last 30 days of crime reports. After getting some route options from Google’s Direction API, the API was also able to provide us with a list of points along the route in the form of Longitude and Latitude. We passed these points through the algorithm and ultimately ended up with an overall safety score of the route based on how close recent crimes occurred along, the time of departure against the time the crimes are usually occurring, as well as the nature of the crime and how likely it would be to affect a walking civilian.

After getting the best route, we use Tkinter GeoCoder Library to view the route on an interactive map of Toronto, as well as marking spots of crime data to know which areas we are exactly avoiding and why.

As our target demographic is students, when the student signs up for an account, they can add a pdf of their timetable which will be converted to text using the pdfminer library in Python, and manipulated and parsed using our custom algorithms. The app shows the current day and which classes the student has today. The student can just select a starting point and a lecture for today and the safest route will be provided by our app automatically, and the app automatically detects where the endpoint will be, i.e. the location of the class given the building code. This makes the overall experience easier and streamlined for the student, and helps target our aim of keeping students safe in their day-to-day lives and commute with easy integration to their timetables.

We also used GitHub for effective version control and collaboration amongst our team.

Challenges we ran into

While brainstorming ideas for the project, we came up with an idea which after 3 hours of trying and researching on how to implement came out to be implemented already by the company that we were targeting the project for. This was quite a disheartening moment for us as we had wasted the prime hours of our hackathon on a project that we could not work on. Thus, we had to spend more time thinking about a more innovative and applicable idea within the theme of the hackathon. After the collaborative and supportive work that the team did, integrating all the working components of the project including the UI was a complex task in itself. We had more features to add to the application including a Google Maps link generator that would give you a link to navigate the route while walking but we could not implement it due to the time constraints.

Accomplishments that we're proud of

Our team had little to no experience creating a GUI, let alone integrating a functional map that the user can interact with. We also had minimal experience working with APIs. Overall, we are extremely proud of the software created given that we had to research how to implement it during the hackathon.

What we learned

Developing a full-stack application for a hackathon that directs users toward the safest path taught numerous important things. Success depended heavily on front-end and back-end developers working together and communicating. The foundation of a safety route identification system's foundation is a good data set that includes detailed crime patterns. This emphasized how important data management and collecting are. We developed advanced algorithms that combined AI and machine learning methods to provide precise route suggestions and safety evaluations. We also discovered that the user experience is crucial. In order to promote app adoption and guarantee that users could comprehend and engage with it with ease, it was imperative to design an intuitive and user-friendly interface. We also learned how to research for questions we don’t know the answer to by surfing the web, answer forums, and documentations, and the importance of collaborating to exponentially decrease problem-solving time.

What's next for SafeCampus

Next, we plan on making a mobile application for the people to use so that the students can have the Urban Guardian more accessible and useful. Alongside this, we think that the application would have a lot of scope as there are so many features that could be added like, what places on campus are safer to park your bikes. We would also want to increase the target universities and the areas covered by the application so that the Urban Guardian can be helpful to more people. The Urban Guardian can also have things like live location sharing and real-time map changing in the maps.

Built With

Share this project:

Updates

Submission history