Professional Documents
Culture Documents
com
AD71STZOFW
Social Media Analytics
Proprietary This
content. ©Great
file is meantLearning. All Rights
for personal use Reserved. Unauthorized use or distribution
by shubradipghoshju@gmail.com only. prohibited
Sharing or publishing the contents in part or full is liable for legal action.
Agenda
• Importance of web & social media analytics
• Social media analytics with twitter data
• Setting up the twitter API
• Extracting tweets
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
file is meantLearning. All Rights
for personal use Reserved. Unauthorized use or distribution
by shubradipghoshju@gmail.com only. prohibited
Sharing or publishing the contents in part or full is liable for legal action.
IMPORTANCE OF WEB & SOCIAL MEDIA ANALYTICS
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 3
Sharing or publishing the contents in part or full is liable for legal action.
Where do I apply the concepts learnt?
If your potential
customer is out
there on social
media
If you want to
For a business
shubradipghoshju@gmail.com
that depends
crowd and get
on the internet
noticed
Course
motivation
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 4
Sharing or publishing the contents in part or full is liable for legal action.
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 5
Sharing or publishing the contents in part or full is liable for legal action.
What happens in the internet every minute…
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 6
Sharing or publishing the contents in part or full is liable for legal action.
Where is this data generated from?
shubradipghoshju@gmail.com
AD71STZOFW
Cloud IoT
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 7
Sharing or publishing the contents in part or full is liable for legal action.
What is web analytics & social media analytics
•Measurement and
shubradipghoshju@gmail.com
•Analysing data from
analysis of data about social media to
AD71STZOFW
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 8
Sharing or publishing the contents in part or full is liable for legal action.
Applications of WSMA
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 9
Sharing or publishing the contents in part or full is liable for legal action.
WSMA and business value
Customer • Brand promotion
engagement • Brand salience
Service
• Use Voice of customer to improve product/service
improvement
Crisis
• Sentiment analysis & hate speech detection
management
Stock indices • Customer sentiments have an impact on stock indices
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 10
Sharing or publishing the contents in part or full is liable for legal action.
SOCIAL MEDIA ANALYTICS WITH TWITTER
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 11
Sharing or publishing the contents in part or full is liable for legal action.
About Twitter..
Information
Microblogging
from tweets &
site
tweet metadata
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com
Sharing or publishing the contents in part or full is liable for legal action.
Applications of twitter data
Trending topics Customer perception Reach Event detection
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com
Sharing or publishing the contents in part or full is liable for legal action.
Pros & Cons of twitter data
A very small % of tweets are accurately
geo coded
Twitter API is more open and accessible Stores only 6-9 days of tweets
Advantages Limitations
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com
Sharing or publishing the contents in part or full is liable for legal action.
SETTING UP TWITTER API
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com
Sharing or publishing the contents in part or full is liable for legal action.
What is an API?
Application
shubradipghoshju@gmail.com
AD71STZOFW
programming Software intermediary
interface that allows two
applications to talk to
each other
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com
Sharing or publishing the contents in part or full is liable for legal action.
Twitter API
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com
Sharing or publishing the contents in part or full is liable for legal action.
Twitter API – R vs Python
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
file is meantLearning. All Rights
for personal use Reserved. Unauthorized use or distribution
by shubradipghoshju@gmail.com only. prohibited
Sharing or publishing the contents in part or full is liable for legal action.
Package rtweet
convert response
Rtweet is an R package
shubradipghoshju@gmail.com
AD71STZOFW
objects to more user
used for extracting data friendly data
from Twitter API structures---e.g., data
frames
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com
Sharing or publishing the contents in part or full is liable for legal action.
Pre-requisites to setup R
Install the
rtweet and
Open an httpuv
interactive packages in R
shubradipghoshju@gmail.com
AD71STZOFW Ensure there session in R
is no pop-up like R studio
Log into your blocker in
twitter your browser
You need a account in
twitter your browser
account –
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com
Sharing or publishing the contents in part or full is liable for legal action.
Setting up R environment for Twitter API
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com
Sharing or publishing the contents in part or full is liable for legal action.
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com
Sharing or publishing the contents in part or full is liable for legal action.
COMPONENTS OF TWITTER METADATA
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com
Sharing or publishing the contents in part or full is liable for legal action.
Twitter metadata
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
file is meantLearning. All Rights
for personal use Reserved. Unauthorized use or distribution
by shubradipghoshju@gmail.com only. prohibited
Sharing or publishing the contents in part or full is liable for legal action.
Structure of a tweet
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com
Sharing or publishing the contents in part or full is liable for legal action.
USING TWITTER METADATA FOR SOCIAL MEDIA ANALYTICS
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com
Sharing or publishing the contents in part or full is liable for legal action.
EXTRACTING TWEETS USING R
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
file is meantLearning. All Rights
for personal use Reserved. Unauthorized use or distribution
by shubradipghoshju@gmail.com only. prohibited
Sharing or publishing the contents in part or full is liable for legal action.
Use case – Targeted promotion
• You are planning to run a twitter ad campaign for an IoT based
product.
• Identify top 100 users you have recently tweeted on IoT, to target
these users for your promotions.
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 28
Sharing or publishing the contents in part or full is liable for legal action.
Approach for targeted promotion
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
file is meantLearning. All Rights
for personal use Reserved. Unauthorized use or distribution
by shubradipghoshju@gmail.com only. prohibited
Sharing or publishing the contents in part or full is liable for legal action.
Followers_count
Digital marketers
Measure of influence on strategically position
social media ads on popular accounts
for increased visibility
Proprietary This
content. ©Great
file is meantLearning. All Rights
for personal use Reserved. Unauthorized use or distribution
by shubradipghoshju@gmail.com only. prohibited
Sharing or publishing the contents in part or full is liable for legal action.
Use case – Identify popular media for promotions
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 31
Sharing or publishing the contents in part or full is liable for legal action.
Approach to identifying popular media
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
file is meantLearning. All Rights
for personal use Reserved. Unauthorized use or distribution
by shubradipghoshju@gmail.com only. prohibited
Sharing or publishing the contents in part or full is liable for legal action.
Retweet_count
utilize existing
Tweet re-shared by content to build a
another user following for your
shubradipghoshju@gmail.com
AD71STZOFW brand
• You are creating branding message for one of your fitness brands
• Identify popular tweets on fitness that have been retweeted many
times to bundle your branding message
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 34
Sharing or publishing the contents in part or full is liable for legal action.
Approach to extracting retweets
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
file is meantLearning. All Rights
for personal use Reserved. Unauthorized use or distribution
by shubradipghoshju@gmail.com only. prohibited
Sharing or publishing the contents in part or full is liable for legal action.
Brand salience
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 36
Sharing or publishing the contents in part or full is liable for legal action.
Use case – compare brand salience
• Compare Netflix and Prime video with time series plots
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 37
Sharing or publishing the contents in part or full is liable for legal action.
Approach to compare brand salience
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
file is meantLearning. All Rights
for personal use Reserved. Unauthorized use or distribution
by shubradipghoshju@gmail.com only. prohibited
Sharing or publishing the contents in part or full is liable for legal action.
TEXT MINING FOR SOCIAL MEDIA ANALYTICS
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
file is meantLearning. All Rights
for personal use Reserved. Unauthorized use or distribution
by shubradipghoshju@gmail.com only. prohibited
Sharing or publishing the contents in part or full is liable for legal action.
What is Text Mining?
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 41
Sharing or publishing the contents in part or full is liable for legal action.
Core objective of text mining
how to quantify
what a document
shubradipghoshju@gmail.com
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 42
Sharing or publishing the contents in part or full is liable for legal action.
Challenges in Text Mining
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 43
Sharing or publishing the contents in part or full is liable for legal action.
What is NLP?
Computer
Science
shubradipghoshju@gmail.com
AD71STZOFW
NLP
Artificical Human
Intelligence Language
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 44
Sharing or publishing the contents in part or full is liable for legal action.
Data Sources for NLP
SM comments,
shubradipghoshju@gmail.com
AD71STZOFW Google search Query databases Blogs
likes, posts
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 45
Sharing or publishing the contents in part or full is liable for legal action.
What will you use NLP for?
Extracting entities
Text classification
shubradipghoshju@gmail.com
AD71STZOFW
Topic extraction
Information retrieval
Relationship extraction
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 46
Sharing or publishing the contents in part or full is liable for legal action.
USE CASES – TEXT MINING ON TWEET TEXT
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 47
Sharing or publishing the contents in part or full is liable for legal action.
Use case – extract keywords from tweet text
• Extract keywords on a fitness brand to understand what people
mention frequently about the brand
• Visualise the keywords using word clouds and bar plots
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
file is meantLearning. All Rights
for personal use Reserved. Unauthorized use or distribution
by shubradipghoshju@gmail.com only. prohibited
Sharing or publishing the contents in part or full is liable for legal action.
Approach - Keyword extraction
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
file is meantLearning. All Rights
for personal use Reserved. Unauthorized use or distribution
by shubradipghoshju@gmail.com only. prohibited
Sharing or publishing the contents in part or full is liable for legal action.
Use case – sentiment analysis of a brand
• Perform sentiment analysis on a fitness brand to understand
customer’s sentiment on the brand
• Use sentiment scores on tweets to identify promoters and detractors
of a fitness brand
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
file is meantLearning. All Rights
for personal use Reserved. Unauthorized use or distribution
by shubradipghoshju@gmail.com only. prohibited
Sharing or publishing the contents in part or full is liable for legal action.
Approach – sentiment analysis
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
file is meantLearning. All Rights
for personal use Reserved. Unauthorized use or distribution
by shubradipghoshju@gmail.com only. prohibited
Sharing or publishing the contents in part or full is liable for legal action.
SOCIAL MEDIA POWERED APPROACH FOR A BUSINESS USE CASE
shubradipghoshju@gmail.com
AD71STZOFW
Proprietary This
content. ©Great
file is meantLearning. All Rights
for personal use Reserved. Unauthorized use or distribution
by shubradipghoshju@gmail.com only. prohibited
Sharing or publishing the contents in part or full is liable for legal action.
•Identify potential customers
Customer
•Understand customer interests and
acquisition preferences
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 53
Sharing or publishing the contents in part or full is liable for legal action.
Extract user
Customer Identify potential
Choose relevant
social media
Identify followers details of people
customers of the brand who post on
acquisition accounts
fitness
• Fitness brand
• Fitness influencers
Revenue
growth
shubradipghoshju@gmail.com
AD71STZOFW
Customer
experience
Customer
loyalty
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 54
Sharing or publishing the contents in part or full is liable for legal action.
Extract user
Customer Identify potential
customers
Choose relevant
social media
Identify followers
of the brand
names of people
who post on
acquisition accounts
fitness
• Fitness brand
• Fitness influencers
Position your
Revenue Targeted
promotions based
Where to promote
– most effective
What to promote -
Extract popular
branding message
around these
growth on customer
interests
channel? tweets on fitness tweets or trending
topics
shubradipghoshju@gmail.com
AD71STZOFW
Customer
experience
Customer
loyalty
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 55
Sharing or publishing the contents in part or full is liable for legal action.
Extract user
Customer Identify potential
customers
Choose relevant
social media
Identify followers
of the brand
names of people
who post on
acquisition accounts
fitness
• Fitness brand
• Fitness influencers
Position your
Revenue Targeted
promotions based
What is trending in
the world of
Extract popular
branding message
around these
growth on customer
interests
fitness?
tweets on fitness
tweets or trending
topics
shubradipghoshju@gmail.com
AD71STZOFW
Extract
Customer Understand
Voice of
keywords from
Topic modeling
Understand
customer
experience Customer
social media
posts
perception
Customer
loyalty
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 56
Sharing or publishing the contents in part or full is liable for legal action.
Extract user
Customer Identify potential
customers
Choose relevant
social media
Identify followers
of the brand
names of people
who post on
acquisition accounts
fitness
• Fitness brand
• Fitness influencers
Position your
Revenue Targeted
promotions based
What is trending in
the world of
Extract popular
branding message
around these
growth on customer
interests
fitness?
tweets on fitness
tweets or trending
topics
shubradipghoshju@gmail.com
AD71STZOFW
Extract
Customer Understand
Voice of
keywords from
Topic modeling
Understand
customer
experience Customer
social media
posts
perception
Customer Customer
sentiment & NPS
Perform sentiment
Identify promoters
& detractors based
Review trackers to
quickly flag
loyalty Score
analysis on brand on tweet sentiment
scores
unhappy customers
Proprietary This
content. ©Great
meantLearning. All Rights
use Reserved. Unauthorized use or distribution
only. prohibited
file is Sowmya Vivek
for personal by shubradipghoshju@gmail.com 57
Sharing or publishing the contents in part or full is liable for legal action.