{"id":305,"date":"2019-05-23T18:43:34","date_gmt":"2019-05-23T16:43:34","guid":{"rendered":"https:\/\/dynamiacs.com\/?p=305"},"modified":"2021-07-10T16:31:34","modified_gmt":"2021-07-10T14:31:34","slug":"collecting-tweets-and-do-some-sentiment-analysis-and-visualize-with-powerbi","status":"publish","type":"post","link":"https:\/\/dynamiacs.com\/?p=305","title":{"rendered":"Collecting tweets and do some sentiment analysis and visualize with PowerBI"},"content":{"rendered":"\n<p>With Microsoft Flow you can do some good things for analysis how people talk about things in social media f.e. twitter.<\/p>\n\n\n\n<p>For this I will collect twitter tweets filter by hashtag, detect the tweet language, do some sentiment analysis on the tweet text and store it in Data verse (formally know as Common Data Service) in a custom table (formally known as entity). To visualize the analysis I will connect PowerBi to Data Verse (formally know as Common Data Service) and build some reporting tiles.<\/p>\n\n\n\n<p>the first step in my flow is the trigger called &#8220;When a tweet is posted&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"998\" height=\"308\" src=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.15.47.png\" alt=\"\" class=\"wp-image-306\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.15.47.png 998w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.15.47-300x93.png 300w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.15.47-768x237.png 768w\" sizes=\"auto, (max-width: 998px) 100vw, 998px\" \/><\/figure>\n\n\n\n<p>In my example i will collect tweets that mentioned the Microsoft PowerPlatform and the tools in there.<\/p>\n\n\n\n<p>The next step will detect the language of the tweet text. For this I will use the action called &#8220;Detect Language&#8221; which uses the Microsoft Text Analysis connector. This you have first to create in the Azure Portal to get the keys to set up the connection, there is also a free version available. This is not described here in this post.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"998\" height=\"308\" src=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.16.05.png\" alt=\"\" class=\"wp-image-307\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.16.05.png 998w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.16.05-300x93.png 300w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.16.05-768x237.png 768w\" sizes=\"auto, (max-width: 998px) 100vw, 998px\" \/><\/figure>\n\n\n\n<p>In the field &#8220;Text&#8221; I will select the &#8220;Tweet Text&#8221; from the trigger step.<\/p>\n\n\n\n<p>Now I have all to analyze the sentiment of the Tweet Text. To do this I will select as the next step an action that is called &#8220;Detect Sentiment&#8221;. After inserting the &#8220;Tweet Text&#8221; as the input there will be a &#8220;Apply for each&#8221; step. In the field for the language in which the analysis will be done we select the &#8220;Language code&#8221; from the &#8220;detect language&#8221; step. <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"485\" src=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.16.25-1024x485.png\" alt=\"\" class=\"wp-image-308\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.16.25-1024x485.png 1024w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.16.25-300x142.png 300w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.16.25-768x364.png 768w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.16.25.png 1026w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The last step in my is to store the Data in Data Verse (formally know as Common Data Service). First you have to create a custom table (formally known as entity) in Data Verse. This process step is not described here in the post.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"520\" src=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.36.01-1024x520.png\" alt=\"\" class=\"wp-image-309\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.36.01-1024x520.png 1024w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.36.01-300x152.png 300w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.36.01-768x390.png 768w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.36.01-1600x812.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>To store the data in Data Verse I will use an action called &#8220;Create a Record&#8221;. In this action we have to select the environment and the table and we have to select the input for the different columns (formally known as fields) in the table. For this you can use the outputs of the steps before or you can do some expression to f.e. store the actual date\/time value.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"938\" height=\"1024\" src=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.16.46-938x1024.png\" alt=\"\" class=\"wp-image-310\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.16.46-938x1024.png 938w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.16.46-275x300.png 275w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.16.46-768x838.png 768w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.16.46.png 1030w\" sizes=\"auto, (max-width: 938px) 100vw, 938px\" \/><\/figure>\n\n\n\n<p>Here is an overview of the complete flow.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"864\" height=\"930\" src=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.15.28.png\" alt=\"\" class=\"wp-image-313\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.15.28.png 864w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.15.28-279x300.png 279w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.15.28-768x827.png 768w\" sizes=\"auto, (max-width: 864px) 100vw, 864px\" \/><\/figure>\n\n\n\n<p>To get some reports or kpi\u00b4s for the data I can connect PowerBI to Data Verse and create some reports. Here you can create f.e. a map with the location of the tweets or you show some Top-N table.<\/p>\n\n\n\n<p>Here you find 2 example report pages.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"520\" src=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.19.41-1024x520.png\" alt=\"\" class=\"wp-image-311\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.19.41-1024x520.png 1024w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.19.41-300x152.png 300w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.19.41-768x390.png 768w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.19.41-1600x812.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"520\" src=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.19.52-1024x520.png\" alt=\"\" class=\"wp-image-312\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.19.52-1024x520.png 1024w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.19.52-300x152.png 300w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.19.52-768x390.png 768w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/05\/Bildschirmfoto-2019-05-23-um-19.19.52-1600x812.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>How cool is that? \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With Microsoft Flow you can do some good things for analysis how people talk about things in social media f.e. twitter. For this I will collect twitter tweets filter by hashtag, detect the tweet language, do some sentiment analysis on the tweet text and store it in Data verse (formally know as Common Data Service)&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kadence_starter_templates_imported_post":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[8],"tags":[21,61,40,56,43,173,41,60,42,6],"class_list":["post-305","post","type-post","status-publish","format-standard","hentry","category-blog","tag-cognitive-services","tag-column","tag-common-data-service","tag-data-verse","tag-entity","tag-power-automate","tag-power-bi","tag-table","tag-text-analytics","tag-twitter"],"taxonomy_info":{"category":[{"value":8,"label":"Blog"}],"post_tag":[{"value":21,"label":"Cognitive Services"},{"value":61,"label":"Column"},{"value":40,"label":"Common Data Service"},{"value":56,"label":"Data Verse"},{"value":43,"label":"Entity"},{"value":173,"label":"Power Automate"},{"value":41,"label":"Power BI"},{"value":60,"label":"Table"},{"value":42,"label":"Text Analytics"},{"value":6,"label":"Twitter"}]},"featured_image_src_large":false,"author_info":{"display_name":"Jan","author_link":"https:\/\/dynamiacs.com\/?author=2"},"comment_info":0,"category_info":[{"term_id":8,"name":"Blog","slug":"blog","term_group":0,"term_taxonomy_id":8,"taxonomy":"category","description":"","parent":0,"count":38,"filter":"raw","cat_ID":8,"category_count":38,"category_description":"","cat_name":"Blog","category_nicename":"blog","category_parent":0}],"tag_info":[{"term_id":21,"name":"Cognitive Services","slug":"cognitive-services","term_group":0,"term_taxonomy_id":21,"taxonomy":"post_tag","description":"","parent":0,"count":4,"filter":"raw"},{"term_id":61,"name":"Column","slug":"column","term_group":0,"term_taxonomy_id":61,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":40,"name":"Common Data Service","slug":"common-data-service","term_group":0,"term_taxonomy_id":40,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"},{"term_id":56,"name":"Data Verse","slug":"data-verse","term_group":0,"term_taxonomy_id":56,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"},{"term_id":43,"name":"Entity","slug":"entity","term_group":0,"term_taxonomy_id":43,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":173,"name":"Power Automate","slug":"power-automate","term_group":0,"term_taxonomy_id":173,"taxonomy":"post_tag","description":"","parent":0,"count":6,"filter":"raw"},{"term_id":41,"name":"Power BI","slug":"power-bi","term_group":0,"term_taxonomy_id":41,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":60,"name":"Table","slug":"table","term_group":0,"term_taxonomy_id":60,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":42,"name":"Text Analytics","slug":"text-analytics","term_group":0,"term_taxonomy_id":42,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":6,"name":"Twitter","slug":"twitter","term_group":0,"term_taxonomy_id":6,"taxonomy":"post_tag","description":"","parent":0,"count":3,"filter":"raw"}],"_links":{"self":[{"href":"https:\/\/dynamiacs.com\/index.php?rest_route=\/wp\/v2\/posts\/305","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dynamiacs.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dynamiacs.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dynamiacs.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dynamiacs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=305"}],"version-history":[{"count":2,"href":"https:\/\/dynamiacs.com\/index.php?rest_route=\/wp\/v2\/posts\/305\/revisions"}],"predecessor-version":[{"id":453,"href":"https:\/\/dynamiacs.com\/index.php?rest_route=\/wp\/v2\/posts\/305\/revisions\/453"}],"wp:attachment":[{"href":"https:\/\/dynamiacs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dynamiacs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=305"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dynamiacs.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}