Create additional functionality to a theoretical app- PlanMyTrip. The new functions will allow users to plan a trip itinerary based on maximum and minimum temperatures to help identify cities and hotels that meet those requirements. Using mapping tools, a visualization via google maps will show the user the cities and hotels for their trip, along with driving directions.
- cities.csv
- OpenWeatherMap
- gmaps
- Jupyter Notebook
- Python 3.6
- Pandas
Using citipy module in jupyter notebook, the nearest city to over 2000 randomly generated latitudes and longitudes was retrieved. An API call is made to OpenWeatherMap to retrieve location and weather information about the city.
The retrieved data is parsed and added to a data frame.
Weather data is loaded into a new notebook where users must enter the maximum and minimum temperature for their desired trip.
The cities are filtered based on the entered information.
An API call is made to gmaps to locate hotels close to the latitude and longitude from the citipy weather response and added to a new column in the data frame.
Hotel names are added to pop up markers on a map.
The hotel and weather information is then used to generate a 4 city itinerary of travel.
The new functions of the app work as intended. Users are able to input a desired temperature range and over 2000 cities are parsed through OpenWeatherMap that need that criterion. Gmaps is used to find nearby hotels. Gmaps also displays them visually using google maps with information available by selecting a balloon over the hotel. Users select their desired hotels for their trip itinerary. Gmaps then maps the driving directions and displays the selected hotels on google maps with the additional information above each hotel that was previously selected in the itinerary.
The application is still limited in that only the closest hotel is displayed to the listed city coordinates. Additional variety could be added for the user if additional hotels were available, or criteria was able to be entered for the type or class of hotel. Also, the city names are somewhat limited due to the limitation placed on the number of cities available from the OpenWeatherMap Search. Adding additional criteria after the initial search so that users could select regions, and then search again, to produce additional cities for selection could increase user satisfaction with the app.