Inspiration

During the winter months, it can be hard to exercise and when that does happen, you might run into weather that discourages you from doing it again. We created Travel Buddy to track storms and calculate if they coincide with your path while you are predicted to be on it.

What it does

This code:

  1. Automatically find park near you.
  2. Calculates a path between you and those parks.
  3. Splits the path into 10 near-evenly spaced points and checks for storms at those points.
  4. Creates a map corresponding to a path segment and what times you are supposed to be there.
  5. Slices the hourly weather forecasts and checks for excessive snowfall or rain.
  6. Only returns valid parks.

How we built it

We used OpenStreetMap, OpenRouteService, Geocoding Service, and Open Meteo. The map shown on the Python GUI is made with OpenStreetMap. We use OpenStreetMap to locate nearby parks and to map to them. Then, we decode the path given to us and simplify the map to around ten near-evenly spaced points, which we pass into the Open-Meteo to predict the hourly weather. With the hourly weather, we then use the pace and distance between each point to calculate how long the user should be between those points and slice only the corresponding hourly values for those points. This process is repeated for the way back.

Challenges we ran into

Getting all of these APIs to run together and processing each of the outputs was a major challenge. The schema of each return value for each API is different, and each time we wanted to use the output we would have to print out the return value and manually see where it was. Putting all of the APIs together was also hard because sometime APIs return or expect the latitude and longitude values in that order, or they would return or expect longitude and then latitude, and sometimes it would return longitude and latitude and expect latitude then longitude.

Accomplishments that we're proud of

We are most proud of how well we were able to get our GUI to work and how well we were able to integrate all of the APIs. The GUI took most of our time mostly because we tried to integrate it with our Python code, which was a hot mess.

What we learned

This was our first time using HTML, CSS, and JavaScript, which made our entire front-end really difficult to develop. We used the Eel package in Python to expose more complex function to our JavaScript because we were much more comfortable writing code in Python than JavaScript.

What's next for Travel Buddy

Going forward, we want to clean up our code and move our Python code to JavaScript, which will help this become more accessible because it will be a website. Another thing that we will have to do to make it a website is to be less dependent on APIs because of the wait times and our limited budget to spend on API keys.

Share this project:

Updates