Skip to content

McGlash/Weather-vs.-Latitude-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What's the Weather Like?

Background

Whether financial, political, or social -- data's true power lies in its ability to answer questions definitively. I used 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

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

  • 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.
  • Created 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.
  1. I created a series of scatter plots to showcase the relationships between latitude and different weather measures.

  2. I ran linear regression on each relationship, on data separated into the Northern Hemisphere (greater than or equal to 0 degrees latitude) and the Southern Hemisphere (less than 0 degrees latitude)

Part II - VacationPy

I used jupyter-gmaps and the Google Places API (file) to:

  • Create a heat map that displays the humidity for every city from the part I.

    heatmap

  • Narrowed down the DataFrame to find on ideal weather condition.

  • Used Google Places API to find the first hotel for each city located within 5000 meters of your coordinates.

  • Plotted the hotels on top of the humidity heatmap with each pin containing the Hotel Name, City, and Country.

    hotel map

About

Used call to OpenWeatherMap API to generate a data set of 500+ cities across the world of varying distance from the equator. Analyzed how different measures of weather differ based on latitude, if at all.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors