9. The trouble with data
• You need to find data API
• Get Access – Signup for key
• Find data endpoint
• Read docs to learn what parameters you
have
• Get data in obscure format
• Use data after converting and filtering
• More APIs you use, more is your
annoyance
10. To make data access
easy on the web,
Yahoo! created YQL
17. Finding Videos about IIT-M
SELECT * FROM youtube.search where
query=’IIT Madras'
18. Selecting Photos of Hackday
SELECT * FROM flickr.photos.search where
text="hackday”
SELECT * FROM flickr.photos.search where
text="hackday” LIMIT 5
19. Inserting data
INSERT INTO bitly.shorten (login, apiKey, longUrl)
VALUES ('ME', 'API_KEY', 'http://yahoo.com')
21. Accessing Private Data
http://query.yahooapis.com/v1/yql
Uses OAuth 1.0 for authorization
OAuth is complicated – use one of our SDKs
https://github.com/yahoo
26. How about these formats
Atom Json
Csv Microformats
Feed Rss
Html xml
27. Company Headlines anyone??
select * from html where
url="http://finance.yahoo.com/q?
s=YHOO" and xpath=‘//
div[@id="yfi_headlines"]/div[2]/ul/
li/a’
34. GEO HACKING
• GOOD NEWS! - Not hard to do.
• YQL as always has a solution to
most geo problems.
35. REQUIREMENTS
• Finding current location.
• Turning a location into a place.
• Finding geographical hierarchy.
• Geo-tagging information.
• Displaying geo information.
36. Current Location
IP Sniffing
W3C geolocation API
User Social presence (foursquare,
twitter, flickr etc.)
37. REQUIREMENTS
• Finding current location.
• Turning a location into a place.
• Finding geographical hierarchy.
• Geo-tagging information.
• Displaying geo information.
38. GEOCODING AND REVERSE-GEOCODING
• converting street addresses or place
names into geographic coordinates
(and vice versa).
h"p://developer.yahoo.com/yql/console/#h=desc%20geo.placefinder
39. YQL to the rescue
select * from geo.placefinder where text="IIT
Madras India"
select * from geo.placefinder where
text="13.063970,80.243110" and gflags="R"
40. REQUIREMENTS
• Finding current location.
• Turning a location into a place.
• Finding geographical hierarchy.
• Geo-tagging information.
• Displaying geo information.
42. REQUIREMENTS
• Finding current location.
• Turning a location into a place.
• Finding geographical hierarchy.
• Geo-tagging information.
• Displaying geo information.
43. PLACEMAKER
• Takes text/web URL and
extracts the geographical
information from it.
• SELECT * FROM
geo.placemaker WHERE
documentContent = "Hey,
I am in bangalore now.
Will visit mumbai and
delhi before going back to
sunnyvale" AND
documentType="text/
plain"
44. EXAMPLES
• SELECT * FROM geo.placemaker WHERE
documentURL = "http://en.wikipedia.org/wiki/
Country" AND documentType="text/html”
• SELECT * FROM geo.placemaker WHERE
documentURL = "http://
timesofindia.feedsportal.com/c/33039/f/
533917/index.rss" AND documentType="text/
rss"
h"p://developer.yahoo.com/geo/placemaker/
45. REQUIREMENTS
• Finding current location.
• Turning a location into a place.
• Finding geographical hierarchy.
• Geo-tagging information.
• Displaying geo information.
49. Final Lessons: Links
• All Yahoo! APIs and Services
• http://developer.yahoo.com/everything.html
• YQL Documentation
• http://developer.yahoo.com/yql
• YQL Console
• http://developer.yahoo.com/yql/console
• YQL Github Account (Contribute Tables)
• http://github.com/yql/yql-tables
50. LETS LOCATE YOUR HACK!
THANKS!!
If you throw a guy on Foursquare and a guy on Twitter off a cliff, which one
would hit the ground first?
The guy on Twitter. The guy on Foursquare would have to stop halfway down
to check in!
PRAJWAL BS
Twitter - @prajwalbs
Slideshare - http://www.slideshare.net/prajwalbs
Facebook - http://www.facebook.com/prajwalbs