Picture this: you’re a young woman, and you’ve recently just moved to a new city. You’re excited to have new experiences, explore your new home, etc., but there’s one thing that’s stopping you: you’re worried about your personal safety.

We speak beyond our personal experiences here, and we believe there exists a real need for young women and people walking alone. For this problem, we introduce to you, SmartWalk!

What it does

SmartWalk evaluates the safest pathway to your next destination using the Inrix routing API and real data from the San Francisco Police Department.

How we built it

SmartWalk uses the INRIX Routing API to determine the three quickest pathways to your destination. To give routes a safety rating, we used data from the San Francisco Police Department criminal incident report from the last 6 months. We parsed through the data to figure out the number of incidents along the route and generated a safety rating for the three pathways, indicating how safe each path is based on a color coordinated system. We used HTML/CSS for the front-end of the project, but coded the bulk of our application in JavaScript.

Challenges we ran into

The biggest challenges we ran into were difficulties integrating information into our code to determine the safest route for pedestrians to walk. The criteria we intended to use to rank how the safety of multiple paths were of how many people were around a route (determined using Inrix's Trade Area Trips API), and past crime incidents along the way (data file of crimes in San Francisco in the last 6 months). However, we didn’t end up being able to integrate the Trade Area Trips API despite members on our team doing a tremendous amount of work with it. Using the Trade Area Trips API in javascript was really challenging because of each step building off of another. First, we needed to find a more efficient way to generate a new key everytime we called an API, and had to create a function that could generate a new key every time the API would be called. This endeavor was successful, adjusting to the new syntax to achieve a complex goal was challenging. Secondly, we had trouble obtaining the number of cars around each point that we were using Trade Area Trips API data. We didn’t end up being able to solve this challenge, which was unfortunate, but are still proud of the effort that went into this process.

Accomplishments that we're proud of

We successfully used the Inrix Routing API to get routes from a starting point to ending point, which we’re proud of because we didn't have prior experience calling APIs and using asynchronous functions. We’re proud of finding another solution to figuring out safety ratings when our efforts towards the Inrix APIs went south. It was challenging to convert the San Francisco crime information in a usable format for our program, since there was no API we could use for this set of data. We found a .csv file that we had to convert to a JSON and figure out how to parse it for relevant information, and were successful in finding the list of crimes that happened at certain points along a route.

What we learned

For many of us, this project served as a first dive into coding with JavaScript and HTML/CSS as well as incorporating existing data from multiple sources to supplement our program. We used the Inrix’s Routing API and attempted to use the Trade Area Trips API, which was our first experience using data from APIs in our program.

What's next for SmartWalk

First, we hope to fully integrate the TradeAreaTrips API so that it produces the correct count of the number of cars passing by a certain area (given the parameters we enter). Then, we hope to incorporate an API built for primarily routing pedestrian pathways in order to make our pathways more accurate.

Share this project: