YQL and Geo

608 views

Published on

Published in: Technology, Design
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
608
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

YQL and Geo

  1. 1. YQL and GEO!  
  2. 2. Agenda!   •  YQL Overview   •  Making Queries and the Console   •  Demo   •  Geo Hacking   •  YQL and GEO  
  3. 3. The web has lot of data around  
  4. 4. http://developer.yahoo.com/everything.html  
  5. 5. 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  
  6. 6. To make data access easy on the web, Yahoo! created YQL  
  7. 7. YQL turns web services and data on the web into databases.    
  8. 8. YQL lets you access almost all API’s in a Standardized manner.    
  9. 9. API List on console  
  10. 10. select {what} from {where} where {conditions}  
  11. 11. You can select, filter, sort and limit data. You can even insert, update and delete from tables.  
  12. 12. YQL: http://developer.yahoo.com/yql/console  
  13. 13. Finding Videos about IIT-D!   SELECT * FROM youtube.search where query="IIT Delhi"  
  14. 14. Selecting Photos of Hackday!   SELECT * FROM flickr.photos.search where text="hackday"   SELECT * FROM flickr.photos.search where text="hackday” LIMIT 5  
  15. 15. Inserting data!   INSERT INTO bitly.shorten (login,apiKey,longUrl) VALUES ('ME', 'API_KEY', 'http://yahoo.com')  
  16. 16. updating data!   UPDATE social.profile.status SET status="Using YQL UPDATE" WHERE guid="NJFIDHVPVVISDX7UKED2WHU"  
  17. 17. Mix and Match several web services using IN command  
  18. 18. Guess what this does?!   SELECT * FROM google.translate where q in (select title from rss(1) where url="http:// rss.news.yahoo.com/rss/topstories") and target='hi'  
  19. 19. Company Headlines anyone??!   select * from html(1) where url= "http://finance.yahoo.com/q?s=AMZN" and xpath='//div[@id="yfi_headlines"]/div[2]/ ul/li/a'
  20. 20. Using the YQL Console makes data access very easy!  
  21. 21. GEO HACKING!   •  GOOD NEWS! - Not hard to do.   •  YQL as always has a solution to most geo problems.  
  22. 22. REQUIREMENTS!   •  Turning a location into a place.   •  Finding geographical hierarchy.   •  Geo-tagging information.  
  23. 23. REQUIREMENTS!   •  Turning a location into a place.   •  Finding geographical hierarchy.   •  Geo-tagging information.  
  24. 24. 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    
  25. 25. YQL to the rescue!   select * from geo.placefinder where text="IIT Delhi"   select * from geo.placefinder where text="28.61282,77.231079" and gflags="R"  
  26. 26. REQUIREMENTS!   •  Turning a location into a place.   •  Finding geographical hierarchy.   •  Geo-tagging information.  
  27. 27. YQL GEO.PLACES.*!   •  geo.places.ancestors   •  geo.places.belongtos   •  geo.places.children   •  geo.places.common   •  geo.places.descendants   •  geo.places.neighbors   •  geo.places.parent   •  geo.places.siblings  
  28. 28. REQUIREMENTS!   •  Turning a location into a place.   •  Finding geographical hierarchy.   •  Geo-tagging information.  
  29. 29. 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"  
  30. 30. PLACEMAKER!   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/33039/f/ 533917/index.rss" AND documentType="text/rss"
  31. 31. Final Lessons: Links!   http://developer.yahoo.com/yql/console   http://github.com/yql/yql-tables   http://isithackday.com/hacks/geo/ http://isithackday.com/geoplanet-explorer/  

×