/World_Weather_Analysis

Python, JSON, Matplotlib, PySci, NumPy -- Putting it all together

Primary LanguageJupyter Notebook

World_Weather_Analysis

Project Overview

Collect and analyze realtime weather data across cities worldwide. Using the gathered data, map cities with closest hotels, and plan a trip for the PlanMyTrip app around user input on preferred temperature ranges for their vacations.

Purpose:

PlanMyTrip will use the data to recommend ideal hotels based on clients' weather preferences and travel options.

Method:

Python, JSON, CityPy, NumPy, and APIs from Gmaps and OpenWeatherApp-- Putting it all together. Create a Pandas DataFrame with 500 or more of the world's unique cities and their weather data in real time. This process will entail collecting, analyzing, and visualizing the data.

-- Using the random generator for Python, I pulled a list of 2000 randomly generated "latitudes" paired with "longitudes." The total length of cities not in the middle of the ocean was 738 near cities. The weather data pulled was based on Max Temp, Humidity Cloudiness, Wind Speed, and the current weather attributes. I put a data frame together to show the data tabulated.

FIG1Weatherdata

Figure 1. Data table showing compiled data per city randomly generated

-- Then added marker locations to a world map based on the randomly generated locations. This helped get to the second part of the client's ask. Based on user input, these marked points were pulled for temperatures between 65 and 85 degrees Farenheit to help in vacation planning per user input.

Fig2 Del 2 marker map

Figure 2. Google maps markers added to the randomly generated city points.

-- Using a google map feature, labelled the closest hotel to the city generated, and included current weather.

Fig3 Del 2 infomarkers

Figure 3. Labels include closest hotel names, paired with city, country, and current weather type.

PlanMyTrip

Using the previously generated data, given the temperature parameters, and a desire to travel to a place by car; an itenerary was put together with four destinations.

Fig4 VacaItin Driving

Figure 4. The driving plan around Myanmar, India, and Laos is shown with the correct hotel names, city, country, and current weather data.

Analysis

This project was a great determiner of how to use APIs including some of the real time data that can be gathered. If this had been for an actual client, I would also suggest adding nearby attractions, different travel types (Island travel!), and restaurants. All of this is of course possible, and definitely done on current travel sites. It was incredible to learn that random points can be generated, and I want to learn how to pull from specific countries and zip codes(US) for other business options.

Limitations are that some of these points were not near cities (what is this limit?) or in the ocean, or possibly unihabitable. There are of course far more hotels available, English seems to be a limitation for some countries, as well as country's access to the internet, and website building. Obviously living in the US, google seems to be geared to those larger corporations who can afford this type of exposures and postings on google.