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.
- Generate 1500 random (latitude, longitude) pairs.
- For each (latitidue, longitude) pair, find the closest city using the Python module
citipy
. Only keep the unique cities found. - 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 PandasDataFrame
. - Using
matplotlib
andseaborn
, 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.
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.