Skip to content

Perform API calls to OpenWeatherMap to query weather data and plot results.

Notifications You must be signed in to change notification settings

douglasdrake/WeatherData

Repository files navigation

WeatherData

Project Description

Examine how meteorological variables vary with latitude with plots using matplotlib. We would expect the results to be specific to the particular date for which the data were retrieved.

Methods

  1. Generate 1500 random (latitude, longitude) pairs.
  2. For each (latitidue, longitude) pair, find the closest city using the Python module citipy. Only keep the unique cities found.
  3. Perform API calls to OpenWeatherMap with each of the cities to get the current weather conditions. The results are returned in JSON format; we convert these to a list of Python dict structures during the API calls and then convert this list to a Pandas DataFrame.
  4. Using matplotlib and seaborn, plot the various meteorological variables vs. latitude. A wrapper function is provided which plots the data, labels the axes, titles the plot with the date, and saves the plot in one function call.

Results

The code and results are contained in Jupyter notebooks with a name structure weather-MM-DD-YYYY.ipynb, where MM-DD-YYYY is the date the data were retrieved.

About

Perform API calls to OpenWeatherMap to query weather data and plot results.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published