Skip to content

A closer look of weather conditions in 500+ cities across the world are evaluated relative to their distance from the equator. Citipy API and Python is used to collect and evaluate the data. Project fulfilled for Georgia Tech Data Science and Analytics certificate.

Notifications You must be signed in to change notification settings

asmvm/Python_API_Challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python API Challenge

What's the Weather Like?

Table of Contents
  1. Background
  2. Part One
  3. Part Two

Background

Using Python requests, APIs, and JSON traversals, Part I of this project examines weather patterns as we approach the equator. While we intuitively know the temperature gets hotter, we will also evaluate humidity, windspeed, cloudiness, in addition to temperature, to understand how latitude affects weather. Part Two of this project will use jupyter-gmaps and the Google Places API to plan a future vacation based on the data collected in Part One. This python project was completed as a part of Georgia Tech's Data Science and Analytics boot camp.

Built With

Part One

WeatherPy

In order to visualize the weather of 500+ cities across the world of varying distance from the equator, we will utilize citipy, a simple Python library and the OpenWeatherMap API to help create a representative model of weather across world cities.

Python Notebook

To view the python code used to extract and transform the data, select the link below to view the full notebook.

Scatter Plots

Scatter plots illustrating relationship between temperature, humidity, cloudiness, and windspeed vs latitude. Max Temp displayed below. Select links to plots to view remaining plots:

Temperature (F) vs. Latitude

Linear Regression Plots

Linear regression is run on each relationship, while also looking at cities in Northern Hemisphere (greater than or equal to 0 degrees latitude) and Southern Hemisphere (less than 0 degrees latitude). A linear regression function was created to optimize the code when creating the plots:

Northern Hemisphere - Temperature (F) vs. Latitude

Dataframe

The Pandas libray was utilized to create dataframes to hold weather data for 500+ cities and saved as a CSV file.

Part Two

VacationPy

Based on the weather data, jupyter-gmaps and the Google Places API are used to plan future vacations. To view the jupyter notebook for VacationPy, select the link to read the python code.

Heatmap

We can generate a heatmap that displays the humidity for every city plotted in Part One. The humidity level is used as the weight for the heatmap.

Cities Heatmap

Hotel Map

Narrowing down the DataFrame to find the ideal weather condition:

  • Locations are filtered for a max temperature lower than 80 degrees but higher than 70, wind speed less than 10 mph, and zero cloudiness.
  • For the ideal vacation, all destinations must meet the three parameters.
  • Using Google Places API to find the first hotel for each city located within 5000 meters of our coordinates.
  • Hotels are plotted on top of the humidity heatmap with each pin containing the Hotel Name, City, and Country.

Hotel Map

About

A closer look of weather conditions in 500+ cities across the world are evaluated relative to their distance from the equator. Citipy API and Python is used to collect and evaluate the data. Project fulfilled for Georgia Tech Data Science and Analytics certificate.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published