introduction to geo hacking with (amongst others) yahoo technology
DESCRIPTION
Introduction to geo technologies for hacking at the Georgia Tech Uni Hack day.TRANSCRIPT
![Page 1: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/1.jpg)
Introduction to Geo hacking with (amongst others)
Yahoo Technology.
Chris&an Heilmann, Ignite, London, 2nd of March 2010
![Page 2: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/2.jpg)
Geolocation is the new thing.
![Page 3: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/3.jpg)
Good news is that it is not hard to do.
![Page 4: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/4.jpg)
In the following half hour or so I will show you how to solve almost all Geo problems using YQL.
![Page 5: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/5.jpg)
Using YQL in JavaScript:
![Page 6: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/6.jpg)
There are a few different ingredients to playing with geo location.
![Page 7: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/7.jpg)
Finding the current location.
Turning a location into a place.
Finding a geographical hierarchy.
Geo-tagging information.
Displaying geo information.
![Page 8: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/8.jpg)
Fin
din
g t
he
cu
rre
nt
locati
on
.
Finding the current location happens in different ways.
![Page 9: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/9.jpg)
The creepy way - IP sniffing.
Fin
din
g t
he
cu
rre
nt
locati
on
.
![Page 10: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/10.jpg)
Fin
din
g t
he
cu
rre
nt
locati
on
.
![Page 11: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/11.jpg)
h;p://isithackday.com/hacks/geo/js‐loca&on.html
Fin
din
g t
he
cu
rre
nt
locati
on
.
![Page 12: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/12.jpg)
The problem with IP sniffing is accuracy.
Fin
din
g t
he
cu
rre
nt
locati
on
.
![Page 13: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/13.jpg)
The other problem: it is not reliable.
Fin
din
g t
he
cu
rre
nt
locati
on
.
![Page 14: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/14.jpg)
The non-creepy and more accurate way - the W3C geolocation API.
Fin
din
g t
he
cu
rre
nt
locati
on
.
![Page 15: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/15.jpg)
Fin
din
g t
he
cu
rre
nt
locati
on
.
Firefox/(Mobile) Safari/Chrome (dev build)
![Page 16: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/16.jpg)
Another way is of course to get location information from the user’s social presence.F
ind
ing
th
e c
urr
en
t lo
cati
on
.
![Page 17: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/17.jpg)
Plazes, FireEagle, Twitter, Yahoo, Flickr, Foursquare, Gowalla, Brightkite, Google Buzz/Latitude, Dopplr...F
ind
ing
th
e c
urr
en
t lo
cati
on
.
![Page 18: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/18.jpg)
Having a latitude and longitude is fine and dandy but it is ambiguous.
Tu
rnin
g a
lo
cati
on
in
to a
pla
ce
.
![Page 19: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/19.jpg)
The same lat/lon pair could be a lot of things - the centre of a town, a point of interest...
Tu
rnin
g a
lo
cati
on
in
to a
pla
ce
.
![Page 20: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/20.jpg)
This is why we need to turn lat/lon into something that is human readable.
Tu
rnin
g a
lo
cati
on
in
to a
pla
ce
.
![Page 21: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/21.jpg)
This is called reverse geocoding and there are a few services for it out there.
Tu
rnin
g a
lo
cati
on
in
to a
pla
ce
.
![Page 22: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/22.jpg)
My personal favourite (as it works world-wide) is the Flickr reverse geocoder.
Tu
rnin
g a
lo
cati
on
in
to a
pla
ce
.
![Page 23: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/23.jpg)
Tu
rnin
g a
lo
cati
on
in
to a
pla
ce
.
h;p://www.flickr.com/services/api/flickr.places.findByLatLon.html
![Page 24: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/24.jpg)
You can use this using YQL:
Tu
rnin
g a
lo
cati
on
in
to a
pla
ce
.
select * from flickr.places wherelat=51.5142271 and lon=‐0.1289602
![Page 25: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/25.jpg)
To get more in-depth data, use flickr and Yahoo Geo:
Tu
rnin
g a
lo
cati
on
in
to a
pla
ce
.
select * from geo.places where woeid in ( select place.woeid from flickr.places where lat=51.5142271 and lon=‐0.1289602)
![Page 26: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/26.jpg)
Tu
rnin
g a
lo
cati
on
in
to a
pla
ce
.
![Page 27: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/27.jpg)
Tu
rnin
g a
lo
cati
on
in
to a
pla
ce
.
![Page 28: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/28.jpg)
Quick word on woeid: Use it. (Flickr, Dopplr, Twitter and Yahoo do)
Tu
rnin
g a
lo
cati
on
in
to a
pla
ce
.
![Page 29: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/29.jpg)
What’s around a certain location?
Fin
din
g a
ge
og
rap
hic
al
hie
rarc
hy.
h;p://developer.yahoo.com/geo/
![Page 30: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/30.jpg)
GeoPlanet gives you hierarchies:
Parent, Ancestors, Children, Siblings, Neigbours, BelongTos.
Tu
rnin
g a
lo
cati
on
in
to a
pla
ce
.
![Page 31: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/31.jpg)
Fin
din
g a
ge
og
rap
hic
al
hie
rarc
hy.
h;p://isithackday.com/geoplanet‐explorer/?woeid=615702
![Page 32: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/32.jpg)
Fin
din
g a
ge
og
rap
hic
al
hie
rarc
hy.
h;p://isithackday.com/geoplanet‐explorer/geodrilldown.php
![Page 33: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/33.jpg)
Fin
din
g a
ge
og
rap
hic
al
hie
rarc
hy.
![Page 34: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/34.jpg)
Putting it all together, we can get this:
h;p://isithackday.com/hacks/geo/geotest.php
Fin
din
g t
he
cu
rre
nt
locati
on
.
![Page 35: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/35.jpg)
What if you have no location but only a resource?
Ge
o-t
ag
gin
g i
nfo
rmati
on
.
![Page 36: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/36.jpg)
h;p://developer.yahoo.com/geo/placemaker/Ge
o-t
ag
gin
g i
nfo
rmati
on
.
![Page 37: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/37.jpg)
Placemaker takes a text, or a web URL and extracts the geographical information from it.
Ge
o-t
ag
gin
g i
nfo
rmati
on
.
![Page 38: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/38.jpg)
Ge
o-t
ag
gin
g i
nfo
rmati
on
. select * from geo.placemaker where documentContent = "Hey I am in Atlanta! I came here from London and will travel onwards to Las Vegas and Sao Paulo" and documentType="text/plain"
![Page 39: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/39.jpg)
Ge
o-t
ag
gin
g i
nfo
rmati
on
. select * from geo.placemaker where documentURL ="h;p://icant.co.uk" and documentType="text/html" and appid=""
select * from geo.placemaker where documentURL ="h;p://newsrss.bbc.co.uk/rss/newsonline_uk_edi&on/front_page/rss.xml"and documentType="text/rss" and appid=""
![Page 40: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/40.jpg)
Placemaker returns places and references - you can use these to enhance texts with geo information.
Ge
o-t
ag
gin
g i
nfo
rmati
on
.
![Page 41: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/41.jpg)
To see Placemaker in action, check out the GeoMaker hack.
Ge
o-t
ag
gin
g i
nfo
rmati
on
.
h;p://github.com/codepo8/geomaker
![Page 42: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/42.jpg)
h;p://icant.co.uk/geomaker/Ge
o-t
ag
gin
g i
nfo
rmati
on
.
![Page 43: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/43.jpg)
Displaying geo information is done via Map APIs
Dis
pla
yin
g g
eo
in
form
ati
on
.
![Page 44: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/44.jpg)
By far the easiest way to build a very simple map is to use the Google static maps API.
Dis
pla
yin
g g
eo
in
form
ati
on
.
![Page 45: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/45.jpg)
<img src=”h;p://maps.google.com/maps/api/sta&cmap?sensor=false&size=200x200&maptype=roadmap&key=YOUR_MAP_KEY&markers=color:blue|label:1|37.4447,‐122.161&markers=color:blue|label:2|37.3385,‐121.886&markers=color:blue|label:3|37.3716,‐122.038&markers=color:blue|label:4|37.7792,‐122.42” alt=””>
Dis
pla
yin
g g
eo
in
form
ati
on
.
![Page 46: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/46.jpg)
If you want to use Yahoo Maps with the data returned from the earlier YQL calls here’s the code:
Dis
pla
yin
g g
eo
in
form
ati
on
.
![Page 47: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/47.jpg)
Dis
pla
yin
g g
eo
in
form
ati
on
.
![Page 48: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/48.jpg)
Dis
pla
yin
g g
eo
in
form
ati
on
.
![Page 49: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/49.jpg)
If you want to use any map provider easily without deep-diving into an API, use Mapstraction.
Dis
pla
yin
g g
eo
in
form
ati
on
.
![Page 50: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/50.jpg)
Dis
pla
yin
g g
eo
in
form
ati
on
.
h;p://www.mapstrac&on.com/
![Page 51: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/51.jpg)
That’s it! You have the tools, now find a cause and get geo hacking!
h;p://delicious.com/tag/geotoys
![Page 52: Introduction to Geo hacking with (amongst others) Yahoo Technology](https://reader034.vdocuments.site/reader034/viewer/2022051412/54bd61db4a79598f278b45b2/html5/thumbnails/52.jpg)
Chris&an Heilmann h;p://wait‐&ll‐i.com h;p://developer‐evangelism.com h;p://twi;er.com/codepo8
Cheers