douglasdrake / WeatherData

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.


Languages

Language:Jupyter Notebook 100.0%