Inspiration
No matter whether you're a tourist visiting a city for the first time in your life or someone who has lived there for your whole life, every city has hidden gems and routes that might not be known even for those who live there for their whole life. To help people get to know their city even better, we developed Hometown Tourist, a web application that is meant to be the encyclopedia when it comes to discovering more about Košice.
What it does
Everything that Google can't!* While it's true that most of the capabilities have been made available through the sponsors who provided us with a generous amount of data, there's still quite a lot of computation and processing needed to achieve some of the most powerful suggestions and results:
- Calculation of optimal routes with specific themed stops and amenities that the person might have on its mind, all on the way to the destination.
- Evaluation of districts/boroughs based on your interests when having to move or looking for a new apartment.
- Pointing out the districts/boroughs based on what's missing to help business owners spot a new great location for their business.
- Creating the ultimate dashboard for both individual users planing their next weekend activities and governmental organs planing a greener future for their city.
On top of that, the capabilities scaling directly with the amount of data provided is a plus, implying that the results will always be up-to-date, as long as the data gets updated regularly. While it makes our project very specific to Košice, it's also what makes it so unique.
How we built it
Since the team consisted of three people, it was very convenient to split the whole project into three separate parts: front-end with React, back-end with FastAPI and data analysis and data storing with MongoDB. While the least visible, data-preparation was arguably the most important part of the project: clean, translated and indexable data allowed us to extract a lot of information relatively quickly with merely some small but smart queries:
# Find all points within the polygon
query = {"location": {"$geoWithin": {"$geometry": polygon}}}
result = collection.find(query)
The fact that MongoDB supports GeoJSON filetypes means that we can do complex calculations involving $geoWithin and $near like polygon intersections and other geographical queries for unbelievably computationally cheap - this is already a big plus, even though truly visible only once the scalability becomes a factor.
No matter how algorithmically brilliant, eye-candy and a beautiful presentation are still the most important things when it comes to any product, this is where our front-end expert used his knowledge to implement a webapp using React and MapBox for all the visuals. Back-end with the Fast-API was responsible for connecting the two seemingly separately implemented parts into one functioning project.
Challenges we ran into
Visualization, as always, turned out to be a lot more difficult than front-end might usually seem from the first sight. Thousands of waypoints, paths and other n-gons with n being over a thousand turned out to be no joke either. While unbelievably powerful, react proved once again to be tricky when performance and development-speed are both equally important. Efficient code costs precious time, and hacky code is inefficient...
Košice border N-gon with 2779 points
Optimizing the data, data encoding and visualization wasn't easy either, the gigantic mass of data, that partly needed some conversion, was a good opportunity to learn about geodata and the different ways to read, handle and format it. This was however not the biggest problem by far. The most interesting yet probably the hardest topic for us was the deployment with Google Cloud Services/Google Cloud Build and the domain mapping. Although the first steps within the GCP (Google Cloud Platform) were shaky, it quickly turned out to be a convenient way to implement continuous integration. Mapping an external domain to a GCS on the other hand is definitely not something we would recommend; it seems that using Googles own domain and DNS services would probably be a lot easier and quicker.
Accomplishments that we're proud of
We're extremely proud of the final result, and every one of us has some personal achievements that made the 24 hours of hacking absolutely great:
- MongoDB collections and the data preprocessing that we crafted makes this project extremely scalable. Bigger cities with more data will never be the bottleneck since we're already compressing the information and MongoDB can host virtually an infinite amount of data. An increased amount of users won't crash anything either, just like increased traffic would unlikely crash a website. The value is in the querying algorithms and data-driven results, which don't inhibit the future growth.
Amenities in Košice
- Regarding the back-end, we're absolutely stoked about how much we got done within just 24 hours. In combination with what we learned, we definitely gained a lot from this hackathon to use in the next events and projects in terms of knowledge alone.
- Taming React to handle the horde of queries and waypoints was definitely a cherry on the cake that made the final submission just so much more enjoyable, React being unfriendly to hacky solutions was something we were aware of, yet challenged that stigma anyway and made it work in the end.
What's next for Hometown Tourist
Feedback and user hosted events! Whether it's from the Jury or from actual real world users, we believe feedback and surveys could truly reveal how effective this form of city-wide dashboard really is. Based on the most used features of the application we could easily narrow down on one specific feature that made the users fall in love with the application in the first place, or completely opposite, keep our eyes open for more and broader features to add to the arsenal. A more concrete feature that escaped us due to time presure were community hosted events. This feature not only allow infinite influx of events through volunteering, but also a very solid way for monetization through advertising. Either way, we believe in the future of this idea even after the Hackathon and will continue improving it in our free time as a personal project!
* And some other things that Google can!
Log in or sign up for Devpost to join the conversation.