Skip to content

Kpearson72/python-api-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python API Homework - What's the Weather Like?

Equator

Part I - WeatherPyImages

The task was to create a Python script to visualize the weather of 500+ cities across the world of varying distance from the equator.

The first requirement was to create a series of scatter plots to showcase the following relationships:

lat v. temp

lat v. humidity

lat v. cloudiness

lat v. windspeed

The second requirement was to run linear regression on each relationship. This time, separate the plots into Northern Hemisphere (greater than or equal to 0 degrees latitude) and Southern Hemisphere (less than 0 degrees latitude):

N hemisphere temp v. lat

S hemisphere temp v. lat

N hemisphere humidity v. lat

S hemisphere humidity v. lat

N hemisphere cloudiness v. lat

S hemisphere cloudiness v. lat

N hemisphere windspeed v. lat

S hemisphere windspeed v. lat

My final jupyter notebook included:

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

Part II - VacationPy

hotel_map

Planning a future vacation

I used jupyter-gmaps and Google Places API for this part of the assignment.

Tasks for this part of the project consisted of:

  • Creating a heat map that displays the humidity for every city from Part I - WeatherPy

heatmap

  • Narrowing down the DataFrame to find my ideal weather condition. It had to have:

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

    • Wind speed less than 10 mph.

    • Zero cloudiness.

    • Dropped any rows that don't contain all three conditions. You want to be sure the weather is ideal.

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

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

heatmap with pinned hotels

As a final consideration:

I completed my analysis using a Jupyter notebook.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published