Skip to content

This project uses the data from 500+ cities to showcase the relationships between Temperature, Humidity, Cloudiness, and Windspeed. Python, Pandas, Jupyter Notebook, Matplotlib, and Gmaps were used in this project.

Notifications You must be signed in to change notification settings

joekimga/python-api-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Python API - What's the Weather Like?

Background

Python requests, APIs, and JSON traversals to answer a fundamental question: "What's the weather like as we approach the equator?"

Now, we know what you may be thinking: "Duh. It gets hotter..."

But, if pressed, how would you prove it?

Equator

Part I - WeatherPy

In this example, I created a Python script to visualize the weather of 500+ cities across the world of varying distance from the equator. To do this, I utilized a simple Python library, the OpenWeatherMap API, to create a representative model of weather across world cities.

Scatter plots were used to showcase the following relationships:

  • Temperature (F) vs. Latitude

  • fig1

  • Humidity (%) vs. Latitude

  • fig2

  • Cloudiness (%) vs. Latitude

  • fig3

  • Wind Speed (mph) vs. Latitude

  • fig4

A Linear regression was run on each relationship. The plots in the Northern Hemisphere was greater than or equal to 0 degrees latitude and Southern Hemisphere was less than 0 degrees latitude.

  • Northern Hemisphere - Temperature (F) vs. Latitude
  • Southern Hemisphere - Temperature (F) vs. Latitude
  • Northern Hemisphere - Humidity (%) vs. Latitude
  • Southern Hemisphere - Humidity (%) vs. Latitude
  • Northern Hemisphere - Cloudiness (%) vs. Latitude
  • Southern Hemisphere - Cloudiness (%) vs. Latitude
  • Northern Hemisphere - Wind Speed (mph) vs. Latitude
  • Southern Hemisphere - Wind Speed (mph) vs. Latitude

Part II - VacationPy

Jupyter-gmaps and the Google Places API was used for this part of the assignment.

  • Note: if you having trouble displaying the maps, try running jupyter nbextension enable --py gmaps in your environment and retry.

    heatmap

  • The DataFrame was narrowed down to find the ideal weather conditions. For example:

    • A max temperature lower than 80 degrees but higher than 70.

    • Wind speed less than 10 mph.

    • Zero cloudiness.

About

This project uses the data from 500+ cities to showcase the relationships between Temperature, Humidity, Cloudiness, and Windspeed. Python, Pandas, Jupyter Notebook, Matplotlib, and Gmaps were used in this project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published