Inspiration

We were tired of our schools being situated close to nothing of interest. We felt that city planners could find some use in a tool that would show where the ideal spots for building schools would be, taking into account the existing surroundings. This was then generalized from only schools to business owners, home owners, etc.

What it does

Our program finds the optimal spots for placing a store / buying a home / touring a new city, based on the interests of the user. These spots are calculated by the K-means algorithm, which partitions the data points that need to be considered (in this case, home addresses, existing points of interest such as schools, hospitals, libraries, etc) into K different sets. The end result are K different points, which are placed in such a way that each of the K points are situated on the centroids of the K different polygons constructed by the K different sets, effectively minimizing the distance between the K point, and points of interest.

How we built it

Our front ends passes the user given constraints to the back end (number of locations, weights for each type of point of interest). This was done using php for communicating with our API, javascript for displaying the results on google maps. Our back end was built with python. We implemented our own version of the K-means algorithm.

Challenges we ran into

Edge cases pertaining to the K-means algorithm (i.e if any of the K points was not the closest to any of the points of interest, it would lead to a division by zero error). Thus, many changes were made to the algorithm. Also, learning the google maps API.

Accomplishments that we're proud of

The project now works as we intended it to while looking visually appealing.

What we learned

How to use google cloud computing services.

What's next for CalKulocation

Extend it to different cities.

Domain.com Submission

calkulocation.tech

Share this project:
×

Updates