• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Dundee University HackU 2013 - YQL
 

Dundee University HackU 2013 - YQL

on

  • 363 views

 

Statistics

Views

Total Views
363
Views on SlideShare
363
Embed Views
0

Actions

Likes
0
Downloads
1
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Dundee University HackU 2013 - YQL Dundee University HackU 2013 - YQL Presentation Transcript

    • HackU 2013University of Dundee February 2013
    • The web is full of juicy andlong lasting dataHackU 2013 – University of Dundee
    • And there is a lot of it aroundHackU 2013 – University of Dundee
    • However, ourattempts to get it can sometimes be clumsyHackU 2013 – University of Dundee
    • What we need is an easy way to get to that dataHackU 2013 – University of Dundee
    • What about using APIs? Like RSS, JSON, XML, CSV, SOAP, REST, …HackU 2013 – University of Dundee
    • We could use APIs. But there are thousands of APIs...HackU 2013 – University of Dundee
    • and it’s painful to get your head around them!HackU 2013 – University of Dundee
    • What if there was one API… One API for everything on the web?HackU 2013 – University of Dundee
    • One World One Web One API ?Can it ever exist? Sounds like politics!HackU 2013 – University of Dundee
    • Yes it does exist! YQL: The API for the webHackU 2013 – University of Dundee
    • The Yahoo Query Language, or short YQL is a unified interface language to the web. What are you waiting for? http://developer.yahoo.com/yqlHackU 2013 – University of Dundee
    • 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
    • Let’s try a real YQL example I love kittens. YQL get me 5 kitten photos select * fromflickr.photos.search where text="kitten" limit 5HackU 2013 – University of Dundee
    • Let’s try a real YQL example select * from flickr.photos.search where text="kitten" limit 5 Output can be XML or JSONHackU 2013 – University of Dundee
    • I want to use YQL and I want it now. That’s the easy part…http://query.yahooapis.com/v1/public/yql?q=<SQL_QUERY>&format=<FORMAT>e.g.http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20rss%20where%20url%3D%22http%3A%2F%2Frss.news.yahoo.com%2Frss%2Ftopstories%22&format=json There’s also a private endpoint which uses oauth authentication http://developer.yahoo.com/yql/guide/authorization-access.htmlHackU 2013 – University of Dundee
    • That’s not all… You can mix and match several web services using the in() commandHackU 2013 – University of Dundee
    • Mix and match… Find photos in Dundee, UK with a Creative Commons “By” licenseselect * from flickr.photos.info wherephoto_id in (select id fromflickr.photos.search where woe_id in (selectwoeid from geo.places where text=’dundee,uk)and license=4)HackU 2013 – University of Dundee
    • Now use your imagination… and build away! http://isithackday.com/hacks/cantine/index.php?loc=covent+gardenHackU 2013 – University of Dundee
    • Yahoo! offers lots of data for free!flickr.photos.exif   local.search   mybloglog.community.find  flickr.photos.info   music.ar1st.id   mybloglog.member  flickr.photos.interes1ngness   music.ar1st.popular   mybloglog.member.contacts  flickr.photos.recent   music.ar1st.search   mybloglog.member.newwithcontacts  flickr.photos.search   music.ar1st.similar   mybloglog.member.newwithme  flickr.photos.sizes   music.release.ar1st   mybloglog.members.find  flickr.places   music.release.id   mybloglog.stats.find  flickr.places.info   music.release.popular   upcoming.category  geo.places   music.release.search   upcoming.country  geo.places.ancestors   music.track.id   upcoming.events  geo.places.belongtos   music.track.popular   upcoming.events.bes1nplace  geo.places.children   music.track.search   upcoming.groups  geo.places.neighbors   music.video.category   upcoming.metro  geo.places.parent   music.video.id   upcoming.state  geo.places.siblings   music.video.popular   upcoming.user  geo.placetypes   music.video.search   upcoming.venue  gnip.ac1vity   music.video.similar       HackU 2013 – University of Dundee
    • … and more of it. ALL FREE!search.images   search.images   search.images  search.news   search.news   search.news  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
    • 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       http://github.com/spullara/yql-tables/tree/masterHackU 2013 – University of Dundee
    • 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. http://developer.yahoo.com/yql/guide/yql-opentables- chapter.htmlHackU 2013 – University of Dundee
    • What else can you do with YQL?Get data of a website select * from html where url=http:// www.telegraph.co.uk/ and xpath=//h3/aGet data of several websites in one query select * from rss where url in (<url1>,<url2>);HackU 2013 – University of Dundee
    • Anything else? Yes...Create a View (Filtered data set) use http://yqlblog.net/samples/searchrank.xml as searchrank; select * from searchrank where query=pizza and dispurl like %pizzahut% More about YQL Execute: http://developer.yahoo.com/yql/guide/ yql-execute-chapter.htmlHackU 2013 – University of Dundee
    • YQL, where to start…User guide:http://developer.yahoo.com/yqlYQL Console (Test your queries…)http://developer.yahoo.com/yql/console/HackU 2013 – University of Dundee