/World_Weather_Analysis

Utilizing Jupyter notebooks and python to create a vacation itinerary of 4 cities based on maximum and minimum temperatures, and display the points on google maps with updated popup markers displaying essential information for each location.

Primary LanguageJupyter Notebook

World_Weather_Analysis

Overview

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.

Source Data

  • cities.csv
  • OpenWeatherMap
  • gmaps

Software Used

  • Jupyter Notebook
  • Python 3.6
  • Pandas

Process

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.

apicall

The retrieved data is parsed and added to a data frame.

parse_1 parse_2

Weather data is loaded into a new notebook where users must enter the maximum and minimum temperature for their desired trip.

tempentry

The cities are filtered based on the entered information.

dataframe

WeatherPy_vacation_map

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.

hotels

Hotel names are added to pop up markers on a map.

hotel_marker

WeatherPy_travel_map_markers

The hotel and weather information is then used to generate a 4 city itinerary of travel.

itenerary

WeatherPy_travel_map

Results

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.