Amey Holden

View Original

Azure, JavaScript & PCF: Level Up Social Media Monitoring & Analysis

I teamed up with Aaron Powell, Microsoft Cloud Advocate to given take my social media monitoring solution [1] to whole new level of powerful awesomeness with the help of Azure JavaScript & Power Apps Component Framework (PCF). In this article we explore how citizen and professional developers can come together to build POWERful solutions with the Power Platform.

What did we make?

An immersive and AI enriched social media monitoring and analysis model driven app to monitor any hashtags or mentions of your choice!


How did we do it?

2) Identify the location with Power Automate

Generating longitude & latitude from twitter profile location using the Bing connector in Power Automate

4) Call an Azure Function which leverages Azure Cognitive Services to analyse & enrich data then store it in Cosmos DB

For those interested in getting knee deep in code - its all on GitHub here -> https://github.com/aaronpowell/event-twitter-insights/blob/master/README.md

5) Create an Azure Static Web App to generate a word cloud based on the key phrase extraction

See it for yourself at https://thankful-field-048124a1e.azurestaticapps.net/

6) Retrieve enriched data from a message using and Power Automate

7) Surface the data and visualizations in a Model Driven app

Drill down on tweets by sentiment, type, and mentions

8) Extend the model driven app user interface with PCF

In my next article I will deep dive into more technical details behind the beauty and power of the solution, below is a high level technical overview of the working parts involved

Power Automate

We use two flows in Power Automate to achieve the data capture and enrichment

  1. Capture the tweet data, establish unique identifiers in the Common Data Service for the model driven app, calculate location and pass a message to an Azure Queue

  2. Retrieve a message from a queue, write the enriched data to the Common Data Service for the model driven app

Azure

We leverage Azure Functions, Queues, Cognitive Services & Cosmos DB to do the following:

  1. Consume messages from a queue with Azure Functions & integrate with Cognitive Services​

  2. Write data to Cosmos DB

  3. Write messages to a queue which can be consumed by Power Automate

  4. Visualise data in a web app

Link to GitHub repo below [3]

Model Driven App & PCF

The model driven app is the key interface to all the data, we used a range of features to display this data to users in ways which is valuable and creates an enjoyable user experience

  1. Dashboards to visualise and drill down on the tweet data with simple user driven point & click filtering

  2. Many to Many relationship between Key Phrase & Tweets so drill down can be seen from both the tweet and the particular key phrase

  3. Custom PCF Controls were sourced from the amazing PCF Gallery built by other POWERfulDevs out there and shared for absolutely free [2]

[1] https://www.ameyholden.com/articles/social-media-monitoring

[2] https://pcf.gallery/

[3] https://github.com/aaronpowell/event-twitter-insights/blob/master/README.md