Created
March 8, 2014 16:01
-
-
Save poguez/9434005 to your computer and use it in GitHub Desktop.
Geocoding con Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
import pprint | |
import json | |
add = "Buckingham Palace, London, SW1A 1AA" | |
add = urllib2.quote(add) | |
geocode_url = "http://maps.googleapis.com/maps/api/geocode/json?address=%s&sensor=false®ion=uk" % add | |
print geocode_url | |
req = urllib2.urlopen(geocode_url) | |
jsonResponse = json.loads(req.read()) | |
pprint.pprint(jsonResponse) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment