Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Azure Stream & Twitter Sentiment Analytics ML Dashboard on PowerBI

DZone's Guide to

Azure Stream & Twitter Sentiment Analytics ML Dashboard on PowerBI

See how we took a machine learning algorithm, used it for twitter sentiment analysis backed by Azure stream to create a dashboard on PowerBI.

· Cloud Zone
Free Resource

See how the beta release of Kubernetes on DC/OS 1.10 delivers the most robust platform for building & operating data-intensive, containerized apps. Register now for tech preview.

Recently, the integration of Azure Stream Analytics & Azure Machine Learning became available as preview update and it’s possible to add AML web service URL and API key as ‘custom functions‘ with ASA input. In this demo, realtime tweets are collected based on keywords like ‘#HappyHolidays2016‘, ‘#MerryChristmas‘, ‘#HappyNewYear2016‘ and they are directly stored on a .csv file and saved on OneDrive. Here goes the solution architecture diagram of the POC.

SolutionArc

Now, add the Service Bus event hub endpoint as input to the ASA job, while deploying the ‘Twitter Predictive Sentiment Analytics Model‘  and click on ‘Open in Studio‘ to start deploying the model. Don’t forget to run the solution before deploying.

AML

Once the model is deployed, open the ‘Web Service‘ dashboard page to get the model URL and API key, click on default endpoint -> download the excel 2010 or earlier apps. Collect the URL and API key to apply it to ASA function credentials for AML deployment.

DeployedAML

Next, create an ASA job and add the event hub credentials where the real world tweets are getting pushed & click on ‘Functions‘ tab of ASA job to add the AML credentials. Provide model name, URL and API key of the model, and once it’s added, click on Save.

ASA-Functions

 

Now, add the following ASA SQL to aggregate the realtime tweets sentiment scores coming out of the predictive twitter sentiment model.

Query

Provide the output as Azure Blob storage, add a container name and serialization type as CSV, and start the ASA job. Also, start importing data into PowerBI desktop from the ASA output Azure blob storage account.

Output

PowerBI desktop contains in-built power queries to start preparing the ASA output data and processing data types. Choose the AML model sentiment score datatype as decimal type and TweetTexts as Text(String) type.

PBI-AML

Start building the ‘Twitter Sentiment Analytics‘ dashboard powered by @AzureStreaming & Azure Machine Learning API with realworld tweet streaming. There’re some cool custom visuals available on PowerBI.  I’ve used some visuals here like the ‘wordcloud‘ chart which depicts some of the highly scored positive sentiment contained in tweets with specific keywords like ‘happynewyear2016‘, ‘MerryChristmas‘,’HappyHolidays‘ etc.

PBI-visuals

 

In the donut chart, the top 10 tweets with the most positive sentiment counts are portrayed with the specific sentiment scores coming from the AML predictive model experiment integrated with ASA jobs.

New Mesosphere DC/OS 1.10: Production-proven reliability, security & scalability for fast-data, modern apps. Register now for a live demo.

Topics:
analytics ,cloud ,bi

Published at DZone with permission of Anindita Basak, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}