It's almost Halloween!

What it does

Users (probably kids) will give reviews to houses in the neighborhood based on how much and what types of candy they give out on Halloween. Then the program will find houses that will net the user the most amount of candy that they want. The program then finds the quickest route to visit all of the houses and return home. It displays a map with the houses and routes highlighted, along withe directions in text.

How I built it

I built a small database of around 60 houses in a neighborhood, since I was not able to find the data I needed elsewhere. Then Google Directions API is used to determine the route based on the addresses of the homes that the program suggested to visit. The Directions API is also used to get the text directions and for coordinate data used to make the map plot using gmplots library in Python.

Challenges I ran into

When a dead end in the route is reached and the street is curved, the plot based on the the coordinate data in the raw order taken from the API will likely plot the line not on the street but over a block of buildings. Finding a way to try to keep the route plots on the road was a somewhat challenging

Figuring out how to get everything that was working on Python into a html file that my browser can open

Accomplishments that I'm proud of

Being able to do this by myself with very little programming experience

What I learned

How to use APIs, working with JSON data, working with html files

What's next for Trick or Treat Route Finder

Could be generalized to other route finding applications such a bar crawl app

Share this project: