In this project, I created a program to recommend hotels and travel destinations to users based on their weather preferences (specifically temperature). I collected data using APIs from "Open Weather Data" as well as "Google Map Platform".
-
First, I randomly generated latitude and longitude combinations. I generated enough so that when I applied the nearest city function using the citipy module, the cities generated were a good representation of the habitable land mass of the planet.
-
I generated a dataset of cities that was well distributed around the world.
-
I pulled the weather data for all the cities and gathered the data in a Pandas dataframe.
-
I added user inputs to see what the user's minimum and maximum temperature preferences were.
-
I used these preferences to filter the cities in the weather data dataframe.
-
Next, I found hotels within 5000m of these cities using the google directions API.
-
Lastly, I used the API to map all the hotels on a map using markers.
-
Finally, I created a travel itinerary using 4 cities that were close to each other.
-
I used the google directions API to display this on a map as well.
