Dismiss Notice

Register now to be one of the first members of this SharePoint Community! Click here it just takes seconds!

Dismiss Notice
Welcome Guest from Country Flag

Using Flow and Power BI to track social listening through Twitter

Discussion in 'Official Microsoft News' started by Charles Sterling, Apr 14, 2017.

Thread Status:
Not open for further replies.
  1. Charles Sterling

    Charles Sterling Guest

    Blog Posts:
    0
    My favorite solution template for Power BI is the Campaign/Brand Management for Twitter template that does an amazing job of analyzing your social presence through Azure Logic Apps, Machine Learning and SQL Azure

    [​IMG]

    For most my scenarios the solution template was overkill and Flow provides a much lighter weight way of analyzing your social listening.

    Specifically using Flow to trigger an activity based on a specific keyword and inserting the twitter data into a Power BI dataset.

    This post will walk you through the directions to create exactly that. The first thing needed is to create the PowerBI Dataset to receive the twitter data.

    To Create a Power BI Streaming Dataset


    1. Open PowerBI.com Select Datasets, choose streaming datasets and select “Add streaming dataset”

    [​IMG]

    2. In this example we will be using the API based Datasets

    [​IMG]

    3. The next step is to define a data set that matches the data the Twitter activities is retrieving. For better or worse real time streaming datasets only allow three datatypes:

    • Text
    • Number
    • DateTime

    [​IMG]

    The Twitter activity outputs the following data:

    User

    • Description
    • Location
    • Name
    • User name

    Tweet

    • Description
    • Location
    • MediaURLs (Item)
    • Name
    • OriginalTweet.MediaURLs (Item)
    • Retweet count
    • Tweet text
    • Tweeted by
    • User name

    [​IMG]
    In Power BI that dataset would look like the following.

    [​IMG]

    [​IMG]

    For the sake brevity this article will exclude the two MediaUrls with outputs of type Item.
    If you do want to play with those, check out how to iterate through a list of items
    https://flow.microsoft.com/en-us/documentation/apply-to-each/



    4. Create the Flow that triggers and collects the Twitter information.

    To do this navigate to http://flow.microsoft.com, login and click on My flows.

    [​IMG]

    Luckily for us there are a couple of templates that does much of what we want like the “Save Tweets to Google Sheet”, “Save Tweets to SharePoint List” or the “Save Tweets to Excel File”.

    In this case i have opted to start with the “Email myself new Tweets about a certain keyword” as it also retrieves the user details.

    [​IMG]



    6. Modify the Flow to include the Power BI activity, that inserts the data into the Power BI data set.

    To do this is click on “Add an action”, search for “Power BI” and select the Power BI Add Rows to a dataset activity.

    [​IMG]

    7. Map the Twitter output to the Power BI Activity that inserts the data into a Power BI Row.

    As you can see from the screen shot below. The Power BI activity prompts you for all the data needed to make this happen.

    In the screen shot below I have deleted the email activity and attempted to save the Flow before adding the hashtag for the tweets i wanted.

    (Don’t include any spaces like i am showing for the hashtag and you should probably rename the Flow since it is no longer sending email!)



    [​IMG]



    8. Create a Power report that shows the Twitter Data



    [​IMG]

    Throwing a couple of visuals on the report i found it interesting the ESRI map understands Twitter locations (mixed up ordering, incomplete etc)but the Bing maps don’t.

    [​IMG]

    Continue reading...
     
Thread Status:
Not open for further replies.

Share This Page

LiveZilla Live Chat Software