{"id":4953,"date":"2019-06-13T10:09:20","date_gmt":"2019-06-13T14:09:20","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=4953"},"modified":"2022-11-21T09:43:41","modified_gmt":"2022-11-21T14:43:41","slug":"detecting-bots-on-twitter-using-botometer-part-ii","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/detecting-bots-on-twitter-using-botometer-part-ii\/","title":{"rendered":"Detecting Bots On Twitter Using Botometer \u2013 Part II"},"content":{"rendered":"\n<p><em>See <a href=\"\/campus\/ibkr-quant-news\/detecting-bots-on-twitter-using-botometer-part-i\/\">part I<\/a> to learn more about sentiment analysis and bots for use in trading<\/em>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Temporal features<\/h4>\n\n\n\n<p>The category temporal features analyze the tweet rate, timing patterns of tweeting and retweeting, etc. For example, if the account tweets at the same time intervals, then it is most likely a bot.<\/p>\n\n\n\n<p><strong>Election Tweets: Identifying the bots<\/strong><\/p>\n\n\n\n<p>India recently conducted its general election. And there are many bots on Twitter supporting their political parties. It is important to know which tweets were made by bots. But before that let us check if the botometer is working correctly. Let us take known Twitter handles of real political leaders and check if it is anticipating correctly.<\/p>\n\n\n\n<p>First, we install the\nbotometer library using the pip install as shown below and then instantiate a\nbotometer object.<\/p>\n\n\n\n<p>!pip install botometer<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"668\" height=\"89\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/Python-Botometer-1.jpg\" alt=\"Python Botometer for Twitter Sentiment\" class=\"wp-image-4965 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/Python-Botometer-1.jpg 668w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/Python-Botometer-1-400x53.jpg 400w\" data-sizes=\"(max-width: 668px) 100vw, 668px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 668px; aspect-ratio: 668\/89;\" \/><\/figure>\n\n\n\n<p>Now let us try with the known handle of U.S. President Donald Trump and see what the botometer says.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"564\" height=\"30\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/Botomoter-Check-CodeTwitter-1.jpg\" alt=\"Python Botometer Score\" class=\"wp-image-4966 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/Botomoter-Check-CodeTwitter-1.jpg 564w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/Botomoter-Check-CodeTwitter-1-400x21.jpg 400w\" data-sizes=\"(max-width: 564px) 100vw, 564px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 564px; aspect-ratio: 564\/30;\" \/><\/figure>\n\n\n\n<p><strong>@realDonaldTrump<\/strong>&nbsp;is the Twitter handle of the American President. After\nfetching the bot score for this handle we can print and check it using the\nfollowing command.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"371\" height=\"176\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/Botometer-Python-Library-1.jpg\" alt=\"Python Botometer for Twitter Sentiment Categories\" class=\"wp-image-4967 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 371px; aspect-ratio: 371\/176;\" \/><\/figure>\n\n\n\n<p>All the bot scores&#8217; values are very low on a scale of 0-1, indicating that most likely the user is a human. We can also get the final score or the aggregate using the following command.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"672\" height=\"79\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/Python-Botometer-Score-1.jpg\" alt=\"Python Code Botometer\" class=\"wp-image-4968 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/Python-Botometer-Score-1.jpg 672w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/Python-Botometer-Score-1-400x47.jpg 400w\" data-sizes=\"(max-width: 672px) 100vw, 672px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 672px; aspect-ratio: 672\/79;\" \/><\/figure>\n\n\n\n<p>Since most of the tweets made by Mr Doanld Trump are in English, we can consider the English score of 0.03 on a scale of 0-1 as the final indicator. In general, we consider a score of more than 0.6 as an indication that an account is being controlled by a bot. So if any of you who had doubts whether the tweets made by the account @realDonaldTrump were really made by the President himself, then these scores should settle that doubt now.<\/p>\n\n\n\n<p>Now let us get back to the Indian election and check how the Twitter handles of the two top candidates performed.<\/p>\n\n\n\n<p>First, let us run the analysis for the current Prime Minister of India: Mr Narender Modi. His Twitter handle is&nbsp;<strong>@narendramodi<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"523\" height=\"40\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/Python-Twitter-Botometer-1.jpg\" alt=\"Python Code Sentiment Trading\" class=\"wp-image-4969 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/Python-Twitter-Botometer-1.jpg 523w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/Python-Twitter-Botometer-1-400x31.jpg 400w\" data-sizes=\"(max-width: 523px) 100vw, 523px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 523px; aspect-ratio: 523\/40;\" \/><\/figure>\n\n\n\n<p>And his bot scores are<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"669\" height=\"78\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/Sentiment-Trading-Python-1.png\" alt=\"Python for Twitter Sentiment\" class=\"wp-image-4970 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/Sentiment-Trading-Python-1.png 669w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/Sentiment-Trading-Python-1-400x47.png 400w\" data-sizes=\"(max-width: 669px) 100vw, 669px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 669px; aspect-ratio: 669\/78;\" \/><\/figure>\n\n\n\n<p>Since some of Mr Narendra\nModi\u2019s tweets are in Hindi, we need to consider the universal score in this case.\nWhich again is very low indicating a human user.<\/p>\n\n\n\n<p>Now let us perform the same\nexercise for the main opposition Prime Minister Candidate: Mr Rahul Gandhi.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"527\" height=\"56\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/Python-Twitter-Botometer-2-1.jpg\" alt=\"Detecting Bots On Twitter Using Botometer\" class=\"wp-image-4971 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/Python-Twitter-Botometer-2-1.jpg 527w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/Python-Twitter-Botometer-2-1-400x43.jpg 400w\" data-sizes=\"(max-width: 527px) 100vw, 527px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 527px; aspect-ratio: 527\/56;\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"651\" height=\"82\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/Python-Twitter-Botometer-4-1.jpg\" alt=\"Detecting Bots On Twitter Using Botometer\" class=\"wp-image-4972 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/Python-Twitter-Botometer-4-1.jpg 651w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/Python-Twitter-Botometer-4-1-400x50.jpg 400w\" data-sizes=\"(max-width: 651px) 100vw, 651px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 651px; aspect-ratio: 651\/82;\" \/><\/figure>\n\n\n\n<p>Again the score here is very low, indicating a human user. The purpose of this exercise is to check the sanity of the outlooks made by the botometer and they clearly look satisfactory and as expected.<\/p>\n\n\n\n<p>But we have not yet identified the bot followers for these leaders. We can do this by importing the Twitter IDs using the tweepy library and then running the botometer check on each of them. The process of separating bots and calculating the market sentiment might seem like a very difficult task, but it can be done easily with proper preprocessing. In our new course on\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/quantra.quantinsti.com\/course\/sentiment-analysis-in-trading\" target=\"_blank\">Sentiment Analysis in Trading<\/a>\u00a0we show you how to fetch the tweets related to a stock using conditional statements and then perform the pre-processing to identify and remove the unrelated tweets. We then generate the market sentiment and create a trading strategy based on this.<\/p>\n\n\n\n<p><strong>Conclusion<\/strong><\/p>\n\n\n\n<p>The botometer library is built specifically for analyzing the Twitter feed. It is a very important library in the preprocessing of Twitter data before the data can be used to create a trading strategy. Building the gauging of market sentiment is a very difficult task and it needs data from various sources. And all data cannot be treated the same way. So, you need to develop new techniques to preprocess data from blogs and news articles.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The botometer library is built specifically for analysing Twitter feed. <\/p>\n","protected":false},"author":134,"featured_media":4987,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[339,343,349,338,350,341,344],"tags":[851,1041,595,1038,1039],"contributors-categories":[13654],"class_list":{"0":"post-4953","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-data-science","8":"category-programing-languages","9":"category-python-development","10":"category-ibkr-quant-news","11":"category-quant-asia-pacific","12":"category-quant-development","13":"category-quant-regions","14":"tag-algo-trading","15":"tag-botomter","16":"tag-python","17":"tag-sentiment-analysis","18":"tag-social-media-data-science","19":"contributors-categories-quantinsti"},"pp_statuses_selecting_workflow":false,"pp_workflow_action":"current","pp_status_selection":"publish","acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Detecting Bots On Twitter Using Botometer \u2013 Part II<\/title>\n<meta name=\"description\" content=\"Detecting Bots On Twitter Using Botometer. Python botometer library for analysing Twitter feed. Code for fetching data from news sources.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/4953\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Detecting Bots On Twitter Using Botometer \u2013 Part II - Python Library\" \/>\n<meta property=\"og:description\" content=\"Detecting Bots On Twitter Using Botometer. Python botometer library for analysing Twitter feed. Code for fetching data from news sources.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/detecting-bots-on-twitter-using-botometer-part-ii\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2019-06-13T14:09:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-21T14:43:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/sentimentTrading-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"351\" \/>\n\t<meta property=\"og:image:height\" content=\"159\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Varun Divakar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Varun Divakar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t    \"@context\": \"https:\\\/\\\/schema.org\",\n\t    \"@graph\": [\n\t        {\n\t            \"@type\": \"NewsArticle\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/detecting-bots-on-twitter-using-botometer-part-ii\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/detecting-bots-on-twitter-using-botometer-part-ii\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Varun Divakar\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/c1ba2ec6d2105bcd9a7668a58f7003f5\"\n\t            },\n\t            \"headline\": \"Detecting Bots On Twitter Using Botometer \u2013 Part II\",\n\t            \"datePublished\": \"2019-06-13T14:09:20+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:43:41+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/detecting-bots-on-twitter-using-botometer-part-ii\\\/\"\n\t            },\n\t            \"wordCount\": 626,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/detecting-bots-on-twitter-using-botometer-part-ii\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/05\\\/sentimentTrading-1.png\",\n\t            \"keywords\": [\n\t                \"Algo Trading\",\n\t                \"Botomter\",\n\t                \"Python\",\n\t                \"Sentiment Analysis\",\n\t                \"Social Media Data Science\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Programming Languages\",\n\t                \"Python Development\",\n\t                \"Quant\",\n\t                \"Quant Asia Pacific\",\n\t                \"Quant Development\",\n\t                \"Quant Regions\"\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/detecting-bots-on-twitter-using-botometer-part-ii\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/detecting-bots-on-twitter-using-botometer-part-ii\\\/\",\n\t            \"name\": \"Detecting Bots On Twitter Using Botometer \u2013 Part II - Python Library\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/detecting-bots-on-twitter-using-botometer-part-ii\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/detecting-bots-on-twitter-using-botometer-part-ii\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/05\\\/sentimentTrading-1.png\",\n\t            \"datePublished\": \"2019-06-13T14:09:20+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:43:41+00:00\",\n\t            \"description\": \"Detecting Bots On Twitter Using Botometer. Python botometer library for analysing Twitter feed. Code for fetching data from news sources.\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/detecting-bots-on-twitter-using-botometer-part-ii\\\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/detecting-bots-on-twitter-using-botometer-part-ii\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/05\\\/sentimentTrading-1.png\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/05\\\/sentimentTrading-1.png\",\n\t            \"width\": 351,\n\t            \"height\": 159,\n\t            \"caption\": \"Detecting Bots On Twitter Using Botometer \u2013 Part II\"\n\t        },\n\t        {\n\t            \"@type\": \"WebSite\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"name\": \"IBKR Campus US\",\n\t            \"description\": \"Financial Education from Interactive Brokers\",\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"SearchAction\",\n\t                    \"target\": {\n\t                        \"@type\": \"EntryPoint\",\n\t                        \"urlTemplate\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/?s={search_term_string}\"\n\t                    },\n\t                    \"query-input\": {\n\t                        \"@type\": \"PropertyValueSpecification\",\n\t                        \"valueRequired\": true,\n\t                        \"valueName\": \"search_term_string\"\n\t                    }\n\t                }\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"Organization\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\",\n\t            \"name\": \"Interactive Brokers\",\n\t            \"alternateName\": \"IBKR\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"logo\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\",\n\t                \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"width\": 669,\n\t                \"height\": 669,\n\t                \"caption\": \"Interactive Brokers\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\"\n\t            },\n\t            \"publishingPrinciples\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/about-ibkr-campus\\\/\",\n\t            \"ethicsPolicy\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/cyber-security-notice\\\/\"\n\t        },\n\t        {\n\t            \"@type\": \"Person\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/c1ba2ec6d2105bcd9a7668a58f7003f5\",\n\t            \"name\": \"Varun Divakar\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/varundivakar\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Detecting Bots On Twitter Using Botometer \u2013 Part II","description":"Detecting Bots On Twitter Using Botometer. Python botometer library for analysing Twitter feed. Code for fetching data from news sources.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/4953\/","og_locale":"en_US","og_type":"article","og_title":"Detecting Bots On Twitter Using Botometer \u2013 Part II - Python Library","og_description":"Detecting Bots On Twitter Using Botometer. Python botometer library for analysing Twitter feed. Code for fetching data from news sources.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/detecting-bots-on-twitter-using-botometer-part-ii\/","og_site_name":"IBKR Campus US","article_published_time":"2019-06-13T14:09:20+00:00","article_modified_time":"2022-11-21T14:43:41+00:00","og_image":[{"width":351,"height":159,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/sentimentTrading-1.png","type":"image\/png"}],"author":"Varun Divakar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Varun Divakar","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/detecting-bots-on-twitter-using-botometer-part-ii\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/detecting-bots-on-twitter-using-botometer-part-ii\/"},"author":{"name":"Varun Divakar","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/c1ba2ec6d2105bcd9a7668a58f7003f5"},"headline":"Detecting Bots On Twitter Using Botometer \u2013 Part II","datePublished":"2019-06-13T14:09:20+00:00","dateModified":"2022-11-21T14:43:41+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/detecting-bots-on-twitter-using-botometer-part-ii\/"},"wordCount":626,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/detecting-bots-on-twitter-using-botometer-part-ii\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/sentimentTrading-1.png","keywords":["Algo Trading","Botomter","Python","Sentiment Analysis","Social Media Data Science"],"articleSection":["Data Science","Programming Languages","Python Development","Quant","Quant Asia Pacific","Quant Development","Quant Regions"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/detecting-bots-on-twitter-using-botometer-part-ii\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/detecting-bots-on-twitter-using-botometer-part-ii\/","name":"Detecting Bots On Twitter Using Botometer \u2013 Part II - Python Library","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/detecting-bots-on-twitter-using-botometer-part-ii\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/detecting-bots-on-twitter-using-botometer-part-ii\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/sentimentTrading-1.png","datePublished":"2019-06-13T14:09:20+00:00","dateModified":"2022-11-21T14:43:41+00:00","description":"Detecting Bots On Twitter Using Botometer. Python botometer library for analysing Twitter feed. Code for fetching data from news sources.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/detecting-bots-on-twitter-using-botometer-part-ii\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/detecting-bots-on-twitter-using-botometer-part-ii\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/sentimentTrading-1.png","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/sentimentTrading-1.png","width":351,"height":159,"caption":"Detecting Bots On Twitter Using Botometer \u2013 Part II"},{"@type":"WebSite","@id":"https:\/\/ibkrcampus.com\/campus\/#website","url":"https:\/\/ibkrcampus.com\/campus\/","name":"IBKR Campus US","description":"Financial Education from Interactive Brokers","publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ibkrcampus.com\/campus\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ibkrcampus.com\/campus\/#organization","name":"Interactive Brokers","alternateName":"IBKR","url":"https:\/\/ibkrcampus.com\/campus\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","width":669,"height":669,"caption":"Interactive Brokers"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/"},"publishingPrinciples":"https:\/\/www.interactivebrokers.com\/campus\/about-ibkr-campus\/","ethicsPolicy":"https:\/\/www.interactivebrokers.com\/campus\/cyber-security-notice\/"},{"@type":"Person","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/c1ba2ec6d2105bcd9a7668a58f7003f5","name":"Varun Divakar","url":"https:\/\/www.interactivebrokers.com\/campus\/author\/varundivakar\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/05\/sentimentTrading-1.png","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/4953","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/users\/134"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=4953"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/4953\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/4987"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=4953"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=4953"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=4953"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=4953"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}