Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
json in python
import json, urllib
url = "http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_week.geojson"
response = urllib.urlopen(url);
data = json.loads(response.read())
i = 0
for x in data['features']:
i += 1
print i, x['properties']['title']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment