Skip to content

Created a Python script to visualize the weather of 500+ cities across the world of varying distance from the equator. Utilized a Python library ant the OpenWeatherMap API.

Notifications You must be signed in to change notification settings

DSB011/Python-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python API - What's the Weather Like?

Overview:

Whether financial, political, or social -- data's true power lies in its ability to answer "What's the weather like as we approach the equator?"

Part I - WeatherPy:

Created a Python script to visualize the weather of 500+ cities across the world of varying distance from the equator. Utilized a Python library, the OpenWeatherMap API, to create a representative model of weather across world cities. Created a series of scatter plots to showcase the following relationships:

  • Temperature (F) vs. Latitude
  • Humidity (%) vs. Latitude
  • Cloudiness (%) vs. Latitude
  • Wind Speed (mph) vs. Latitude



For the second requirement did a linear regression on each relationship, only this time separating them into Northern Hemisphere (greater than or equal to 0 degrees latitude) and Southern Hemisphere (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:

Used jupyter-gmaps and the Google Places API for this part.

  • Created a heat map that displays the humidity for every city from the part I.
  • Narrow down the DataFrame to find the ideal weather condition.
    • A max temperature lower than 80 degrees but higher than 70.
    • Wind speed less than 10 mph.
    • Zero cloudiness.
  • Used Google Places API to find the first hotel for each city located within 5000 meters of the coordinates.
  • Plotted the hotels on top of the humidity heatmap with each pin containing the Hotel Name, City, and Country.


Tech Environment Used:

Jupyter Notebook, Pandas, Matplotlib, API, Python libraries, Gmaps, Openweather API, Google Places API.

References:

About

Created a Python script to visualize the weather of 500+ cities across the world of varying distance from the equator. Utilized a Python library ant the OpenWeatherMap API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published