Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Dundee University HackU 2013 - YQL


Published on

Published in: Education
  • Be the first to comment

  • Be the first to like this

Dundee University HackU 2013 - YQL

  1. 1. HackU 2013University of Dundee February 2013
  2. 2. The web is full of juicy andlong lasting dataHackU 2013 – University of Dundee
  3. 3. And there is a lot of it aroundHackU 2013 – University of Dundee
  4. 4. However, ourattempts to get it can sometimes be clumsyHackU 2013 – University of Dundee
  5. 5. What we need is an easy way to get to that dataHackU 2013 – University of Dundee
  6. 6. What about using APIs? Like RSS, JSON, XML, CSV, SOAP, REST, …HackU 2013 – University of Dundee
  7. 7. We could use APIs. But there are thousands of APIs...HackU 2013 – University of Dundee
  8. 8. and it’s painful to get your head around them!HackU 2013 – University of Dundee
  9. 9. What if there was one API… One API for everything on the web?HackU 2013 – University of Dundee
  10. 10. One World One Web One API ?Can it ever exist? Sounds like politics!HackU 2013 – University of Dundee
  11. 11. Yes it does exist! YQL: The API for the webHackU 2013 – University of Dundee
  12. 12. The Yahoo Query Language, or short YQL is a unified interface language to the web. What are you waiting for? 2013 – University of Dundee
  13. 13. Accessing the web and its services now becomes easy as ABC SQL select * from web select {what} from {service} where {condition}HackU 2013 – University of Dundee
  14. 14. Let’s try a real YQL example I love kittens. YQL get me 5 kitten photos select * where text="kitten" limit 5HackU 2013 – University of Dundee
  15. 15. Let’s try a real YQL example select * from where text="kitten" limit 5 Output can be XML or JSONHackU 2013 – University of Dundee
  16. 16. I want to use YQL and I want it now. That’s the easy part…<SQL_QUERY>&format=<FORMAT>e.g.* There’s also a private endpoint which uses oauth authentication 2013 – University of Dundee
  17. 17. That’s not all… You can mix and match several web services using the in() commandHackU 2013 – University of Dundee
  18. 18. Mix and match… Find photos in Dundee, UK with a Creative Commons “By” licenseselect * from wherephoto_id in (select id where woe_id in (selectwoeid from geo.places where text=’dundee,uk)and license=4)HackU 2013 – University of Dundee
  19. 19. Now use your imagination… and build away! 2013 – University of Dundee
  20. 20. Yahoo! offers lots of data for free!   mybloglog.member   music.ar1st.popular   mybloglog.member.contacts   mybloglog.member.newwithcontacts   music.ar1st.similar   mybloglog.member.newwithme   music.release.ar1st   mybloglog.members.find  flickr.places   mybloglog.stats.find   music.release.popular   upcoming.category  geo.places  geo.places.ancestors  geo.places.belongtos   music.track.popular  geo.places.children   upcoming.groups  geo.places.neighbors   upcoming.metro  geo.places.parent   upcoming.state  geo.places.siblings   upcoming.user  geo.placetypes   upcoming.venue  gnip.ac1vity       HackU 2013 – University of Dundee
  21. 21. … and more of it. ALL FREE!search.images   search.images   search.images  search.siteexplorer.inlinks   search.siteexplorer.inlinks   search.siteexplorer.inlinks  search.siteexplorer.pages   search.siteexplorer.pages   search.siteexplorer.pages  search.spelling   search.spelling   search.spelling  search.suggest   search.suggest   search.suggest  search.termextract   search.termextract   search.termextract  search.web   search.web   search.web  social.connec1ons   social.connec1ons   social.connec1ons  social.contacts   social.contacts   social.contacts  social.presence   social.presence   social.presence  social.profile   social.profile   social.profile  social.updates   social.updates   social.updates  weather.forecast   weather.forecast   weather.forecast  yahoo.iden1ty   yahoo.iden1ty   yahoo.iden1ty  yap.setsmallview   yap.setsmallview   yap.setsmallview   HackU 2013 – University of Dundee
  22. 22. You want more data? amazon   nmm   bitly   nyt   delicious   opensocial   dopplr   search   etsy   shopping   friendfeed   social   github   twi@er   Greader   update.groovy   guardian   weather   imdb   wesabe   iploca1on   whitepages   las?m   yahoo   nestoria   yelp   ne?lix   zillow 2013 – University of Dundee
  23. 23. Why don’t you create your own data source for YQL… Using YQL’s Open TablesAll we need to do is create a schema that explains the data structure. chapter.htmlHackU 2013 – University of Dundee
  24. 24. What else can you do with YQL?Get data of a website select * from html where url=http:// and xpath=//h3/aGet data of several websites in one query select * from rss where url in (<url1>,<url2>);HackU 2013 – University of Dundee
  25. 25. Anything else? Yes...Create a View (Filtered data set) use as searchrank; select * from searchrank where query=pizza and dispurl like %pizzahut% More about YQL Execute: yql-execute-chapter.htmlHackU 2013 – University of Dundee
  26. 26. YQL, where to start…User guide: Console (Test your queries…) 2013 – University of Dundee