Giter Club home page Giter Club logo

pythonapi's Introduction

Module6Challenge

Overview of Project

Mytrip is a top travel technology company that specializes in internet related services in the hotel and lodging industry. Jack, head of analysis of the user interface team, has requested help with collecting and presenting data for customers via the search page. The goal is to collect and analyze weather data across cities worldwide so that Mytrip can launch the app PlanMyTrip. PlanMyTrip will be used to recommend ideal hotels based on clients' weather preferences and create a travel itinerary between four cities of choice.

Objectives

  • Use the NumPy module to generate more than 2,00 random latitudes and longitudes.
  • Use the citipy module to list the nearest city to the latitudes and longitudes.
  • Use the OpenWeatherMap API to request the current weather data from each unique city in your list.
  • Parse the JSON data from the API request.
  • Collect the following data from the JSON file and add it to a DataFrame:
    • City, country, and date
    • Latitude and longitude
    • Maximum temperature
    • Humidity
    • Cloudiness
    • Wind speed
    • Current weather description
  • Create visuals with travel data via a heatmap with pop-up markers that can display information on specific cities based on a customer's travel preferences.
    • Filter the Pandas DataFrame based on user inputs for a minimum and maximum temperature.
    • Create a heatmap for the new DataFrame.
    • Find a hotel from the cities' coordinates using Google's Maps and Places API, and Search Nearby feature.
    • Store the name of the first hotel in the DataFrame.
    • Add pop-up markers to the heatmap that display information about the city, current weather conditions, and a hotel in the city.
  • Use the Google Directions API to create a travel itinerary that shows the route between four cities chosen from the customer's possible travel destinations. Then create a marker layer map with a pop-up marker for each city on the itinerary.

Development Environment

  • Jupyter Notebook
  • Python v3.10.4 Dependencies:
    • Python Pandas library
    • Python Numpy library
    • Python Matplotlib.pyplot library
    • Scipy.stats module
    • Citipy library
    • Time library
    • Requests library
    • gmaps

Data Sources

Results

Retrieve Weather Data

Generated a set 2,000 random latitudes and longitudes, retrieved the nearest city, and performed an API call with the OpenWeatherMap. Used the API to retrieve the current weather description for each city and created a new DataFrame containing the updated weather data.

Screenshot 2022-04-17 010757

Customer Travel Destinations Map

Used input statements to retrieve customer weather preferences and used those preferences to identify potential travel destinations and nearby hotels. Visualized the potential travel destinations on a marker map with pop-markers.

WeatherPy_vacation_map

Travel Itinerary Map

Used the Google Directions API to create a travel itinerary that shows the route between four cities chosen from the customer's potential travel destinations. Then created a marker layer map with a pop-up marker for each city on the itinerary.

WeatherPy_travel_map

WeatherPy_travel_map_markers

pythonapi's People

Contributors

ksommerdorf avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.