python-api

Python API- What’s the Weather Like?

Background

Whether financial, political, or social – data’s true power lies in its ability to answer questions definitively. So let’s take what you’ve learned about 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

Before You Begin

  1. Create a new repository for this project called python-api-challenge.

  2. Clone the new repository to your computer.

  3. Inside your local git repository, create a directory for both of the Python Challenges. Use a folder name that corresponds to the challenges, such as: WeatherPy.

  4. Inside the folder you just created, add new files called WeatherPy.ipynb and VacationPy.ipynb. These will be the main scripts to run for each analysis.

  5. Push the above changes to GitHub.

Part I - WeatherPy

In this example, you’ll be creating a Python script to visualize the weather of 500+ cities across the world of varying distance from the equator. To accomplish this, you’ll be utilizing a simple Python library, the OpenWeatherMap API, and a little common sense to create a representative model of weather across world cities.

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

After each plot, add a sentence or two explaining what the code is analyzing.

The second requirement is 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):

After each pair of plots, take the time to explain what the linear regression is modeling. For example, describe any relationships you notice and any other analysis you may have.

Your final notebook must:

Part II - VacationPy

Now let’s use your skills in working with weather data to plan future vacations. Use jupyter-gmaps and the Google Places API for this part of the assignment.

To complete this part of the assignment,you will need to do the following:

As final considerations:

Hints and Considerations