jadenthem / google-refine

Automatically exported from code.google.com/p/google-refine
0 stars 0 forks source link

Deriving Street Address and Postcode from Google Maps API via Refine #248

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
with(value.parseJson().results[0].geometry.location, pair, pair.lat +", " + 
pair.lng) 

results in the latitude value and longitude value.

Similarly could you help me with the expression for deriving the Street Address 
and Postcode please?

Thanks!

Original issue reported on code.google.com by jesu.lu...@gmail.com on 23 Nov 2010 at 9:37

GoogleCodeExporter commented 8 years ago

Original comment by tfmorris on 24 Nov 2010 at 10:21

GoogleCodeExporter commented 8 years ago
For postal code, looking at this example

http://maps.google.com/maps/api/geocode/json?sensor=false&address=77+Massachuset
ts+Ave,+Cambridge,+MA

I'd suggest

with(value.parseJson().results[0], r, filter(r.address_components, c, 
c.types[0] == "postal_code")[0].long_name)

Then for street name, change "postal_code" to "route".

Original comment by dfhu...@gmail.com on 25 Nov 2010 at 5:47