yql: master of the mix
TRANSCRIPT
![Page 1: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/1.jpg)
YQL: Master of Mix
![Page 2: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/2.jpg)
Hello!!IIT Madras
![Page 3: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/3.jpg)
![Page 4: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/4.jpg)
Mixing is amazing!!
![Page 5: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/5.jpg)
Mix Chemicals
![Page 6: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/6.jpg)
Classic result of mixing
![Page 7: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/7.jpg)
Classic result of mixing
Steel
![Page 8: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/8.jpg)
Mix Drinks
![Page 9: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/9.jpg)
Mix Music
![Page 10: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/10.jpg)
DATA
![Page 11: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/11.jpg)
DATA
![Page 12: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/12.jpg)
I am Markandey Singh{JavaScript Hacker}
I work at Yahoo!
![Page 13: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/13.jpg)
YQL is Fun….
![Page 14: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/14.jpg)
YQL is Yahoo! Query Language
![Page 15: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/15.jpg)
YQL is a
web service which works on SQL like syntax
![Page 16: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/16.jpg)
On Webinformation is not structured
![Page 17: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/17.jpg)
YQL makes easy to access unstructured
data
![Page 18: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/18.jpg)
THIS IS YQL CONSOLE
![Page 19: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/19.jpg)
SELECT A TABLE
![Page 20: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/20.jpg)
SEE QUERY HERE
![Page 21: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/21.jpg)
OUTPUT
![Page 22: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/22.jpg)
TAKE AWAY QUERY URL
![Page 23: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/23.jpg)
URL output
http://query.yahooapis.com/{query}
![Page 24: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/24.jpg)
URL output
http://query.yahooapis.com/{query}
<xml>
</xml>
![Page 25: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/25.jpg)
URL output
http://query.yahooapis.com/{query}
<xml>
</xml>
{ “json”:”json”}
![Page 26: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/26.jpg)
JSON
{ “name”: “markandey”}
![Page 27: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/27.jpg)
JSON with callback
foo ({ “name”: “markandey”});
![Page 28: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/28.jpg)
YQL Console Demo
![Page 29: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/29.jpg)
Lets see with example
![Page 30: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/30.jpg)
Select * from
interestingness
![Page 31: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/31.jpg)
select * from flickr.photos.interestingness(20) where api_key='0fbb2b721757f77a6a9d038f4649a2b'
![Page 32: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/32.jpg)
select * from flickr.photos.interestingness(20) where api_key='0fbb2b721757f77a6a9d038f4649a2b'
![Page 33: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/33.jpg)
<img src=“//farm{farm-id}.staticflickr.com/{server-id}/{id}_{secret}.jpg“>
select * from flickr.photos.interestingness(20) where api_key='0fbb2b721757f77a6a9d038f4649a2b'
![Page 34: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/34.jpg)
Here is the code
![Page 35: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/35.jpg)
This is what you get
http://bit.ly/yqlflickr
![Page 36: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/36.jpg)
Flickr Demo
![Page 37: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/37.jpg)
$session = curl_init($yql_query_url); curl_setopt($session, CURLOPT_RETURNTRANSFER,true); $json = curl_exec($session);
YQL With PHP
![Page 38: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/38.jpg)
YUI().use('yql', function(Y) {
Y.YQL('select * from weather.forecast where location=90210', function(r) { //r now contains the result of the YQL Query //use the YQL Developer console to learn //what data is coming back in this object //and how that data is structured. });
});
YQL With YUI
![Page 39: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/39.jpg)
YQL has many Yahoo! and non-yahoo tables
![Page 40: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/40.jpg)
Page Scraping
![Page 41: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/41.jpg)
Page Scraping URL
![Page 42: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/42.jpg)
Page Scraping URL
XPATH
![Page 43: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/43.jpg)
Page Scraping
select * from html where url=“------"
and xpath=“--------”;
![Page 44: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/44.jpg)
Your site!!
![Page 45: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/45.jpg)
select * from html where url=“http://www.iitm.ac.in/csdept"
and xpath=“……..”;
URL
![Page 46: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/46.jpg)
select * from html where url=“http://www.iitm.ac.in/csdept"
and
xpath=“//div[@id="content"]/div/table[3]”;
XPATH
![Page 47: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/47.jpg)
ChromYQLipchromy-clip
![Page 48: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/48.jpg)
YQL console demoPage scraping
![Page 49: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/49.jpg)
This is what You get
http://bit.ly/searchiitm
![Page 50: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/50.jpg)
Search demo
![Page 51: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/51.jpg)
Content Analysis with YQL
http://bit.ly/yqlcap
![Page 52: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/52.jpg)
Picture me
http://bit.ly/pikme
![Page 53: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/53.jpg)
What else YQL can do????
![Page 54: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/54.jpg)
You can create your own table
Read more bit.ly/yqlODT
![Page 55: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/55.jpg)
My random hello!! table
![Page 56: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/56.jpg)
Table Demo
![Page 57: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/57.jpg)
Store Secret on YQL
YQL hosted storage
insert into yql.storage.admin
(name, value) values (“value-name”,”value")
![Page 58: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/58.jpg)
Store Secret on YQL
YQL hosted storage
![Page 59: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/59.jpg)
Store Secret on YQL
YQL hosted storage
execute select update
![Page 60: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/60.jpg)
Keys Demo
![Page 61: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/61.jpg)
![Page 62: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/62.jpg)
You Can Also Access Google Spreadsheet
via YQL
![Page 63: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/63.jpg)
You need to publish spreadsheet to the web
![Page 64: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/64.jpg)
You need to publish spreadsheet to the web
https://docs.google.com/spreadsheet/pub?key=0AgGxPO1AxEhldFZDNzAzQldLSGp2MzVGVXdlUnIxeUE&output=html
![Page 65: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/65.jpg)
You need to publish spreadsheet to the web
https://docs.google.com/spreadsheet/pub?key=0AgGxPO1AxEhldFZDNzAzQldLSGp2MzVGVXdlUnIxeUE&output=CSV
![Page 66: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/66.jpg)
You need to publish spreadsheet to the web
https://docs.google.com/spreadsheet/pub?key=0AgGxPO1AxEhldFZDNzAzQldLSGp2MzVGVXdlUnIxeUE&output=CSV
select * from csv where url=’….'
![Page 67: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/67.jpg)
Siri vs fake
![Page 68: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/68.jpg)
Siri Demo
![Page 69: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/69.jpg)
2 More Things
![Page 70: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/70.jpg)
Foo
http://bit.ly/foocode
![Page 71: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/71.jpg)
Foo Demo
![Page 72: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/72.jpg)
CodeFoo plugin for Sublime Text 2
http://bit.ly/codefoo2
![Page 73: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/73.jpg)
Codefoo demo
![Page 74: YQL: Master Of the Mix](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e6172d8b42a8e4c8b5a08/html5/thumbnails/74.jpg)
Reach me
@markandey