Skip to content

Analysis of Weather Around the World & Finding Hotels at Perfect Weather Conditions using Python requests, APIs, and JSON traversals

License

Notifications You must be signed in to change notification settings

RynnAethelWulf/python-api-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project logo

Analysis of Weather Around the World & Finding Hotels at Perfect Weather Conditions

Status GitHub Issues GitHub Pull Requests License


This project breaks down the weather data retrieved from api and finding relationships between weather, humidity and wind-speed using Regression technique and displaying the hotels on google maps for cities satisfying the perfect weather conditions.

📝 Table of Contents

🧐 About

Creating a Python script to visualize the weather of 500+ cities across the world of varying distance from the equator. To accomplish this, we'll be utilizing a Python library, and the OpenWeatherMap API to create a representative model of weather across world cities. Series of scatter plots are created to showcase the following relationships:

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

Second part includes ,Running 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)

🏁 Getting Started

-Randomly selected at least 500 unique (non-repeat) cities based on latitude and longitude. -Performed a weather check on each of the cities using a series of successive API calls. -Included a print log of each city as it's being processed with the city number and city name. -Saved a CSV of all retrieved data and a PNG image for each scatter plot.

✍️ Observable Trends

Part-1 From the data of 574 city locations these were the trends observeved -

  • Temperature increases toward higher latitudes,as earth is tiltled at an angle approx 23.5 degrees where higher latitude are closer to sun and lower latitudes are away from the sun based on the year.
  1. alt text
  2. alt text
  • Areas near the Equator and towards northern latitiude have much higher humidty than towards south poles. Again due to the tilt of the earth towards sun.
  1. alt text
  • A strong linear temeprature drop from eqautor towards north pole.

Part-2
Heat map that displays the humidity for every city of the data on Oct/2020

alt text


For perfect weather conditons here are the criteria considered - A max temperature lower than 80 Fahernheit but higher than 70 Fahernheit.
- Wind speed less than 10 mph.
- Zero cloudiness.
- And finaly humidity between 30 and 60 cent.

Hotels within the perfect weather conditons on Oct/2020

alt text

🎉 Acknowledgements

  • UWA Data Science
  • Citypy python library by wingchen

About

Analysis of Weather Around the World & Finding Hotels at Perfect Weather Conditions using Python requests, APIs, and JSON traversals

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published