Data to impress those who sign the checks Azure logic apps, social media, and sentiment analysis Matt Gordon
Speaker info Matt Gordon Data Platform Solution Architect mgordon@dminc.com : @sqlatspeed www.sqlatspeed.com
About ME 15+ years of SQL Server experience Managed 24x7 datacenters Worked on development teams MCSE: Data Management and Analytics PASS Summit 2017 speaker IDERA SQL Superstar Friend of Redgate Home cook and car geek
How I picked my twitter handle and domain name
agenda What is sentiment analysis? Why is sentiment analysis important? How did I get involved in this? What did I build (i.e. what the heck is a Premier League Mood Table?) How did I build it? Wrap-up and takeaways Q&A
What is sentiment analysis? “The process of computationally identifying and categorizing opinions expressed in a piece of text, especially in order to determine whether the writer’s attitude towards a particular topic, product, etc., is positive, negative, or neutral.” Google’s definition “Using computer magic to figure out how people are feeling when they tweet about something.” My definition
What is sentiment analysis? Also known as opinion mining Concept has been around for a while but rise of social media brought it to the forefront Typically done with specialized tools whose algorithms are unknown Azure Cognitive Services API democratizes this to an extent
What is sentiment analysis? What are the Cognitive Services APIs? Sets of machine learning algorithms to solve problems in the field of AI These algorithms can be consumed through standard REST calls over the Internet
What is sentiment analysis? List of Cognitive Services APIs Vision (analyze images and videos) Speech (speech recognition and speaker identification) Language (understand sentences and intent) Knowledge (enhanced search for research) Search (applies ML to web searches) Mood table (and similar sentiment analysis) uses the Language Cognitive Services API
Why is sentiment analysis important? News cycles used to last days – now they last hours Users/customers live on social media these days Political divisions can affect and “enhance” people’s outrage Being on the wrong end of an unfortunate tweet or post can have lasting consequences Companies should baseline their social media sentiment
Why is sentiment analysis important? Dove Body Wash Facebook campaign in October 2017 Took the brand nearly two days to offer a thorough response Proper sentiment analysis would have alerted them to the issue much earlier Response “by feel” is not fast enough
Why is sentiment analysis important? Entenmann’s #NotGuilty tweet in July 2011 Tweeted on a hashtag dedicated to Casey Anthony verdict Didn’t respond to negative attention for hours Account was actually deleted for a period of time
How did I get involved in this?
How did I get involved in this?
How did I get involved in this?
How did I get involved in this? Men In Blazers (Roger Bennett and Michael Davies) Popular soccer podcast TV show on NBC Sports Network Podcast in mid-October musing about a “mood table” Contacted them with a POC and it’s now become a regular feature on the podcast
How did I get involved in this? Brad Ball’s sentiment analysis blog got my train of thought started Premier League Mood Table expands on single-event sentiment Ranks clubs by supporter sentiments within 10 minutes of the final whistle of a match
What did I build? Premier League Mood Table Azure SQL DB Logic app for all 20 clubs Cognitive Services API (language) Azure Scheduler Job Collection
What did I build?
What did I build?
How did I build it? Azure SQL DB Database to store Twitter information Sentiment score, account, location, tweet text, etc. Queries to rank the clubs by sentiment from best to worst 1 is most positive, 0 is most negative
How did I build it? Logic Apps One per club “When a new tweet is posted” trigger Feeds tweet text to Detect Sentiment action from Cognitive Services API Final step is Insert Row action into Azure SQL DB Original version also streamed to Power BI
How did I build it? Azure Scheduler Job Collection Uses Azure AD to authenticate the logic apps Direct scheduling interface for enable and disable actions Provides run history Provides execution count and error count
DEMO TIME Mood Table In-depth
What’s next? (soccer customer things) Using Python and/or rtweet to scrape past tweets (and ML to score those tweets) in order to form more cohesive and customizable sentiment pictures Working with soccer clubs to map this against fan response, souvenir sales, and game action Working with Raspberry Pi and microphone arrays to do in-stadium “sentiment”
What’s next? (non-soccer customer things) Azure function to send an email or initiate a workflow alerting about Tweets below a certain sentiment score Power BI live sentiment dashboard Geography-based reports
Wrap-up and takeaways Social media presence requires sentiment analysis Any data professional or data-curious pro can have a role in this, especially in smaller organizations Underscores how important machine learning is to understand I am a big dork that built something to rank soccer teams based on feelings
Questions?
Speaker info Matt Gordon Data Platform Solution Architect mgordon@dminc.com : @sqlatspeed www.sqlatspeed.com