import urllib2 import json import matplotlib.pyplot as plt import numpy as np %matplotlib inline r = urllib2.urlopen("http://api.wunderground.com/api/668184b31ecccd65/conditions/q/AR/Conway.json") data = r.read() r.close() decoded = json.loads(data) data decoded location = decoded['current_observation']['observation_location']['city'] temp = decoded['current_observation']['temp_f'] print "Current temp in " + str(location) + " is " + str(temp) r = urllib2.urlopen("http://api.wunderground.com/api/668184b31ecccd65/hourly10day/q/AR/Conway.json") data = r.read() r.close() decoded = json.loads(data) decoded time = [] temp = [] feels = [] for e in decoded['hourly_forecast']: time.append((float(e['FCTTIME']['epoch']) - \ float(decoded['hourly_forecast'][0]['FCTTIME']['epoch'])) / 86400) temp.append(float(e['temp']['english'])) feels.append(float(e['feelslike']['english'])) plt.xkcd() plt.plot(time, temp) plt.plot(time, feels, "r")