{"id":1410,"date":"2013-10-28T20:36:10","date_gmt":"2013-10-28T20:36:10","guid":{"rendered":"http:\/\/www.timestored.com\/b\/?p=1410"},"modified":"2013-11-07T13:22:35","modified_gmt":"2013-11-07T13:22:35","slug":"kdb-twitter-feed-handler","status":"publish","type":"post","link":"https:\/\/www.timestored.com\/b\/kdb-twitter-feed-handler\/","title":{"rendered":"kdb+ Twitter Feed Handler"},"content":{"rendered":"<p>Typical feed handlers for kdb+ are for market data and trade data such as bloomberg B-Pipe or reuters market feeds. These feeds typically contain ticker symbol, bid price, ask price and the time. We&#8217;ve been working on something a little different, a twitter feed handler. With this feed handler you can subscribe to:<\/p>\n<ul>\n<li>A random sample of all tweets<\/li>\n<li>Certain search queries<\/li>\n<li>Locations, tweets for any trending queries will be downloaded for those areas<\/li>\n<\/ul>\n<p>For each tweet we have associated meta data that includes: location, language, time of posting and number of favourites\/retweets.<\/p>\n\r\n<div class=\"media\" itemscope itemtype=\"http:\/\/schema.org\/VideoObject\">\r\n\t\t\t<h3 itemprop=\"name\">kdb+ Twitter Feed Handler<\/h3>\r\n\t\t\t<meta itemprop=\"thumbnailUrl\" content=\"\/kdb-guides\/videos\/twitter-kdb-feedhandler.png\" \/>\r\n\t\t\t<meta itemprop=\"embedURL\" content=\"\/kdb-guides\/videos\/twitter-kdb-feedhandler.mp4\" \/>\r\n\r\n\t\t\t <object id=\"csSWFb\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"  width=\"800\" height=\"450\">\r\n\t\t\t\t<param name=\"movie\" value=\"\/js\/video_controller.swf\" \/>\r\n\t\t\t\t<param name=\"scale\" value=\"showall\" \/>\r\n\t\t\t\t<param name=\"bgcolor\" value=\"#1a1a1a\" \/>\r\n\t\t\t\t<param name=\"allowfullscreen\" value=\"true\" \/>\r\n\t\t\t\t<param name=\"allowscriptaccess\" value=\"always\" \/>\r\n\t\t\t\t<param name=\"flashvars\" value=\"tocdoc=left&amp;showsearch=false&amp;xmp=\/kdb-guides\/videos\/twitter-kdb-feedhandler.xml&amp;autostart=false&amp;autohide=true&amp;content=\/kdb-guides\/videos\/twitter-kdb-feedhandler.mp4&amp;thumb=\/kdb-guides\/videos\/twitter-kdb-feedhandler.png&amp;containerwidth=800&amp;containerheight=450&amp;smoothing=true&amp;enablejsapi=true&amp;fullscreen=true&amp;windowbox=false&amp;showbranding=false&amp;showstartscreen=true&amp;showendscreen=false&amp;basecolor=272727&amp;loop=false\" \/>\r\n\t\t\t\t<!--[if !IE]>-->\r\n\t\t\t\t<object type=\"application\/x-shockwave-flash\" data=\"\/js\/video_controller.swf\"  width=\"800\" height=\"450\">\r\n\t\t\t\t   <param name=\"scale\" value=\"showall\" \/>\r\n\t\t\t\t   <param name=\"bgcolor\" value=\"#1a1a1a\" \/>\r\n\t\t\t\t   <param name=\"allowfullscreen\" value=\"true\" \/>\r\n\t\t\t\t   <param name=\"allowscriptaccess\" value=\"always\" \/>\r\n\t\t\t\t   <param name=\"flashvars\" value=\"tocdoc=left&amp;showsearch=false&amp;autostart=false&amp;autohide=true&amp;content=\/kdb-guides\/videos\/twitter-kdb-feedhandler.mp4&amp;thumb=\/kdb-guides\/videos\/twitter-kdb-feedhandler.png&amp;containerwidth=800&amp;containerheight=450&amp;smoothing=true&amp;enablejsapi=true&amp;fullscreen=true&amp;windowbox=false&amp;showbranding=false&amp;showstartscreen=true&amp;showendscreen=false&amp;basecolor=272727&amp;loop=false\" \/>\r\n\t\t\t\t<!--<![endif]-->\r\n\t\t\t\t   <div>\r\n\t\t\t\t\t   <p>The video content presented here requires JavaScript to be enabled and the latest version of the Adobe Flash Player. If you are using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Adobe Flash Player by <a href=\"http:\/\/www.adobe.com\/go\/getflashplayer\">downloading here<\/a>. <\/p>\r\n\t\t\t\t   <\/div>\r\n\t\t\t\t<!--[if !IE]>-->\r\n\t\t\t\t<\/object>\r\n\t\t\t\t<!--<![endif]-->\r\n\t\t\t <\/object>\r\n\t\t<\/div>\r\n\r\n\n<p>Now that we have our data in kdb+ we can analyse it like any other time-series data and look for interesting patterns. If you have worked on anything similar I would love to hear about it (john AT timestored.com). I find treating social media data as time-series data throws up many interesting possibilities, in future blog posts I&#8217;ll start digging into the data..<\/p>\n<p>At TimeStored we have previously implemented a number of market data feed handlers. Handling reconnections, failover, data backfilling and data enrichment can be a tricky problem to get right, if you need a feed handler developed we provide kdb+ development, consulting and support services, please <a href=\"\/contact?subject=Feedhandler\">contact us<\/a>. <\/p>\n\r\n<p>Basic examples of <a href=\"http:\/\/www.timestored.com\/kdb-guides\/kdb-java-api\">Java kdb+ Feed handlers<\/a> and <a href=\"http:\/\/www.timestored.com\/kdb-guides\/kdb-c-api-example\">C Feed Handlers<\/a> are available on the site.<\/p>\r\n\n","protected":false},"excerpt":{"rendered":"<p>Typical feed handlers for kdb+ are for market data and trade data such as bloomberg B-Pipe or reuters market feeds. These feeds typically contain ticker symbol, bid price, ask price and the time. We&#8217;ve been working on something a little different, a twitter feed handler. With this feed handler you can subscribe to: A random [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0},"categories":[2,23],"tags":[59,90,58],"_links":{"self":[{"href":"https:\/\/www.timestored.com\/b\/wp-json\/wp\/v2\/posts\/1410"}],"collection":[{"href":"https:\/\/www.timestored.com\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.timestored.com\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.timestored.com\/b\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.timestored.com\/b\/wp-json\/wp\/v2\/comments?post=1410"}],"version-history":[{"count":20,"href":"https:\/\/www.timestored.com\/b\/wp-json\/wp\/v2\/posts\/1410\/revisions"}],"predecessor-version":[{"id":1430,"href":"https:\/\/www.timestored.com\/b\/wp-json\/wp\/v2\/posts\/1410\/revisions\/1430"}],"wp:attachment":[{"href":"https:\/\/www.timestored.com\/b\/wp-json\/wp\/v2\/media?parent=1410"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.timestored.com\/b\/wp-json\/wp\/v2\/categories?post=1410"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.timestored.com\/b\/wp-json\/wp\/v2\/tags?post=1410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}