Inspiration

We were brainstorming ideas together in a group chat, and we came upon the idea doing something around the theme of a daycation. After someone brought up the idea of airports and their data, we decided to create essentially a trip generator, and someone else brought up the idea of using the users interests in order to help find a good trip. We explored other ideas as well, but we ended up coming back to this.

What it does

Basically what it is is a trip generator for spontaneous people. Imagine you are bored, have a bunch of free time, basically Summer, and you want a fun 1-2 day trip. Simply input your city, and some of your interests, and it will generate a trip that would be good for you. This trip will be out of town, and you will ride a plane to get there (exciting!) How it works is it takes your city, finds the nearest airport using that, goes through the next 20 flights, and goes through each of those 20 destinations to find a good fit for you based off of your interests. Kind of like an "I'm feeling lucky" but for day trips.

How we built it

First, we got together a list of all the major airports by continent. We got it from a website called airportcodes.io After weeding through airports that didn't work (Military Air Force Bases), we wrote a script that used Google Maps to find the geolocation (longitude, latitude) of all of the airports in that spreadsheet This was basically web-scraping. Afterwards, we downloaded the csv, put it into a Google Colab notebook, and then converted it into a pandas dataframe. We were also working on the frontend as well, a nice looking webpage with a city input and interests input. In the Colab, we wrote code in order to find the nearest airport, which we used Haversine's formula for, with a little help from a nice stack-overflow post This ended up needing Google's geocode API, in order to find coordinates of cities easily. After this, we used the airlabs.co API in order to find the flight schedule of the nearest airport, and with some help from Flight24's unofficial API to get airport coordinates, we go the first 20 destinations, which we then iterated over and checked with the list of interests, using OpenMapTrip's API to find what to do at those locations. After finding a location that checks the most boxes on the list of interests, this is outputted. Currently, it's only NA only, but other's can be added as the airports are in a repo

Challenges we ran into

Some challenges were first of all finding the coordinates for the airports. This looks easy, but it took quite a long time to write a script that could do this, as we were not very familiar with using pyautogui. What we thought would be the biggest issue was finding some way to correlate the interests to the city. The way we did it was imperfect, as OpenMapTrip has much deeper interest categories, but it was a lot better than our first idea, which was to just search up the interest and the city and see how many search results popped up. Another big problem we had was finding airport scedhules. We had to look through many APIs in order to find one that worked well, and we were not familiar with JSON and requesting from APIs, and it ended up only being flights in the near future, not any date, as we had originally wanted. The biggest challenge, however, was linking the frontend and the backend together. We had all had experience with either the frontend or the backend, but never in linking both of them together. Thus, we had a lot of difficulty even starting this. We also were in different time zones, with some of us in NA and some of us in Asia, so it was hard working together, as we would be asleep and awake at different times.

Accomplishments that we're proud of

We are proud of making something work, as this was all of our first hackathons, and we have no experience really doing any kind of things like this to this length. It was really satisfying how smoothly we worked together, even though we only came together moments after the hackathon started. We're also pretty proud of the web-scraper we made to find the geolocation of the airports, because even though better solutions probably were available, it was much more fun actually doing the scraping and compiling it than simply having an API or database already there, ready. This was our first time using an API as well, and it was very satisfying having everything somehow work at least (or at least seem to work), and it took a lot of trial and error, which made it running a lot more fun.

What we learned

We learned a lot, from what a JSON is, how to make a frontend, how to use APIs, what an API key is, what the Haverstine formula is, different formats for longitude and latitude, how many major airports there are, how to use pandas better, how to use the requests package, how many APIs there are for flights (way too many!) and also how to work as a small dev team, how to brainstorm, how to deal with different time zones, and some knowledge of how to link frontend and backend. What we take away from here is that the API was not set up to accommodate functions on the front end. This needs to be considered next time when building the web app. Solutions could not be formulated due to time constraint and inactivity of group member(s).

What's next for Quicky Trips

Next, we want to include different regions, as well as add more information on the destination city and flights, expand the interests page, refine the frontend, and get more flights from the flight schedule. Also better mapping from interest to city, as well as include more airports and possibly taxi/bus options.

Built With

Share this project:

Updates