Giter Club home page Giter Club logo

world_weather_analysis's Introduction

World_Weather_Analysis

Overview of Project

The purpose of this project is to create a vacation itinerary using Google APIs and OpenWeather API.

Process to Generate Itinerary

Gather Weather Information

The first section of the project involved generating random sets of latitude and longitude pairs and using the CitiPy module to locate the nearest cities to the pairs.

Next, using the cities, we used the OpenWeather API to collect information in JSON format for City Name, Country, Latitude, Longitude, Max Temperature, Humidity, Cloudiness, Wind Speed, and Current Weather Description.

This data was then used to create a DataFrame, and then exported as CSV file within the Weather_Database folder.

Gather Hotel Information

The second section of the project involved using the previously generated Weather Data to locate the nearest Hotel to Preferred Cities using Google API. First, the user is asked what their minimum and maximum temperature preference would be for their trip. For this project, the minimum temperature was set at 75°F, and the maximum temperature was set at 90°F.

A new DataFrame was created for the cities which met the preferred temperature range. This DataFrame was then cleaned of any missing values which may not have been collected from the OpenWeather API search.

Next, using Google API, we iterated through the preferred cities DataFrame to find the first Hotel Name from the results of hotels near the Latitude and Longitude of each city. Each Hotel Name was added to the Hotel Name column of a new DataFrame.

The Hotel DataFrame was cleaned of any missing values for Hotel Names that were not located, and was then exported as a CSV file to the Vacation_Search folder. A map image was generated with the hotel locations as markers on the map, with an Info Box which appears when the location marker is clicked to review data for each Hotel in each City. An image of the Hotel marker map was save to the Vacation_Search folder.

Hotels Map

Plan Trip Itinerary

The final section of the project involved using Google API to map a Trip Itinerary between 4 different cities. For the purposes of this project, 4 cities were chosen in Mexico, all of which met the temperature range criteria, and all of which could be travelled between by Driving.

Driving Map

First, the preferred cities CSV file was used to generatea DataFrame of cities which met the original temperature range criteria. We then repurposed our code from the location markers map image to generate the image again and search for suitable cities in a single country between which travel by car was available. The cities chosen were all in Mexico; Lazaro Cardenas; La Cruz; Chicontepec; Anton Lizardo. The start and end cities for the trip were both Lazaro Cardenas.

A new image was created using Google Directions API to set a Directions Layer with the Start and End Points, the Waypoints of the three other cities to visit, and the Travel Mode of Driving. The image with the Info Boxes for the Hotel and City information was saved to the Vacation_Itinerary folder.

Hotel Info

world_weather_analysis's People

Contributors

jormerr avatar

Watchers

 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.