Twitter Blocked: Social Media Analytics
Twitter Blocked: Social Media Analytics
Experiment No. 1
Aim: To study various Social Media platforms, Social Media analytics tools,
Social Media Analytics techniques and engagement metrics, Applications of Social
media analytics for business.
Theory:
A. Social media platforms:-
Social media are interactive media technologies that facilitate the creation and
sharing of information, ideas, interests, and other forms of expression through
virtual communities and networks. While challenges to the definition of social
media arise due to the variety of stand-alone and built-in social media services
currently available, there are some common features:
SMA Lab/VIII 1
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
Social media analytics is broader than metrics such as likes, follows, retweets,
previews, clicks, and impressions gathered from individual channels. It also differs
from reporting offered by services that support marketing campaigns such as
LinkedIn or Google Analytics.
Social media analytics uses specifically designed software platforms that work
similarly to web search tools. Data about keywords or topics is retrieved through
search queries or web ‘crawlers’ that span channels. Fragments of text are returned,
loaded into a database, categorized and analyzed to derive meaningful insights.
Google Analytics
Twitter Analytics
Facebook Insight
Hootsuite
C. Social Media Analytics techniques and engagement metrics:-
In Social Analytics reports we display data as it comes from the various social
channel's APIs.
As there are many different types of data, understanding these can be difficult and
it may appear to vary from tool to tool or even from the native channels. Rest
assured that our data is accurate, and there is usually an explanation for any
apparent data discrepancies.
If you'd like to learn the definitions for the metrics within Owned Social Analytics,
check out our dedicated article here.
In Social Analytics there are three different types of data:
Page level data accounts for actions taken on the page during a time frame.
SMA Lab/VIII 2
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
Post level data is lifetime values specific to actions taken on those posts.
Member data are the demographics and audience location data points and
widgets.
In Social Analytics, most metrics, such as the overview cards at the top and graphs
showing data over time, are based on Page level data. For example, Total
Impressions is the total number of impressions on any post on the page during the
time frame.
Measuring a website
To measure a website, you first have to create a Google Analytics account. Then
you need to add a small piece of JavaScript measurement code to each page on
your site. Every time a user visits a webpage, the tracking code will collect
pseudonymous information about how that user interacted with the page.
SMA Lab/VIII 4
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
For the Google Store, the measurement code could show how many users visited a
page that sells drinkware versus a page that sells houseware. Or it could tell us how
many users bought an item like an Android doll by tracking whether they made it
to the purchase-confirmation page.
The measurement code will also collect information from the browser like the
language setting, the type of browser (such as Chrome or Safari), and the device
and operating system on which the browser is running. It can even collect the
“traffic source,” which is what brought users to the site in the first place. This
might be a search engine, an advertisement they clicked on, or an email marketing
campaign.
Once Analytics processes the data, it’s stored in a database where it can’t be
changed.
So remember, when you set up your configuration, don’t exclude any data you
think you might want to analyze later. Once the data has been processed and stored
in the database, it will appear in Google Analytics as reports.
Screenshots:
SMA Lab/VIII 5
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
2. Report Snapshot:Acquisition
3. Traffic acquisition
SMA Lab/VIII 6
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
4. Engagement :Conversions
SMA Lab/VIII 7
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
6. Demographic Details:
CONCLUSION: -
In this experiment we learnt about various Social Media platforms, Social Media
analytics tools, Social Media Analytics techniques and engagement metrics,
Applications of Social media analytics for business.
SMA Lab/VIII 8
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
Experiment No. 2
THEORY:
Social media data is any type of data that can be gathered through social media. In
general, the term refers to social media metrics and demographics collected
through analytics tools on social [Link] media data can also refer to data
collected from content people post publicly on social media. Social media data
collection can help you customize your social media marketing strategy for each
social network. Even more specifically, you can customize your strategy by
location or demographics.
Some of the most important raw data you can collect through social media:
SMA Lab/VIII 9
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
2. Web Crawling:
Web Crawling is analogous to a spider crawling but the place of crawling here is
the web!. It basically visits a website and read web pages for the purpose of
building entries for search engine index. The tools that are used for web crawling
are known as web crawlers or spiders. A series of web pages are analyzed and links
to the pages on them are then followed for even more links thus it does a deep
search for extracting of information. Famous search engines such as Google,
Yahoo and Bing do web crawling and use this information for indexing web pages.
Examples are Scrapy and Apache nut.
3. Data Parsing:
Data parsing is converting data from one format to another. Widely used for data
structuring, it is generally done to make the existing, often unstructured, unreadable
data more comprehensible.
Data parsing is a widely used method for data structuring; thus, you may discover
many different descriptions while trying to find out what exactly it is. To make
understanding this concept easier, we’ve put it into a simple definition.
SMA Lab/VIII 10
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
( scraping,crawling,parsing) for structured data.
SMA Lab/VIII 11
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
Experiment No. 3
THEORY:
What is data cleaning?
Data cleaning is the process of fixing or removing incorrect, corrupted, incorrectly
formatted, duplicate, or incomplete data within a dataset. When combining multiple
data sources, there are many opportunities for data to be duplicated or mislabeled.
If data is incorrect, outcomes and algorithms are unreliable, even though they may
look correct. There is no one absolute way to prescribe the exact steps in the data
cleaning process because the processes will vary from dataset to dataset. But it is
crucial to establish a template for your data cleaning process so you know you are
doing it the right way every time.
While the techniques used for data cleaning may vary according to the types of
data your company stores, you can follow these basic steps to map out a framework
for your organization.
In this experiment we are going to collect unstructured data from twitter tweets,
store it, perform variouscleansing operations, preprocessit and do the further
sentiment analysis on filtered tweets.
Twitter is an online social media and social networking service owned and
operated by American companyTwitter, Inc., on which users post and reply to
texts, images and videos known as "tweets".Registered users cantweet, like,
'retweet' tweets and direct message (DM), while unregistered users only have the
ability to viewpublic tweets. Users interact with Twitter through browser or mobile
frontend software, or programmatically viaits APIs.
Tweets are publicly visible by default, but senders can restrict message delivery to
only their followers. Userscan mute users they do not wish to interact with, block
accounts from viewing their tweets, and removeaccounts from their followers list
Users can tweet via the Twitter website, compatible external applications(such as
for smartphones), or by Short Message Service (SMS) available in certain
[Link] maysubscribe to other users' tweets—this is known as "following"
and subscribers are known as "followers" or"tweeps",
SMA Lab/VIII 13
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
Using snscrape, the services supported for Twitter are : users, user profiles,
hashtags, searches (live tweets, toptweets, and users), tweets (single or surrounding
thread), list posts, communities, and trends.
snscrape requires Python 3.8 or higher. The Python package dependencies are
installed automatically when youinstall snscrape.
nltk:
Natural Language Toolkit is a leading platform for building Python programs to
work with human languagedata. It provides easy-to-use interfaces to over 50
corpora and lexical resources such as WordNet, along with asuite of text processing
libraries for classification, tokenization, stemming, tagging, parsing, and
semanticreasoning,NLTK is available for Windows, Mac OS X, and Linux. It is
one of the most used libraries for naturallanguage processing and computational
linguistics
textblob:
Specify maximum results (5000),start date to end date and twitter search topic
(Budget2023),fetch records and store using [Link]
3. Read and display the fetched records by using:
SMA Lab/VIII 14
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
[Link](5)
4. Use :[Link]() to write object to a comma-separated values (csv) file
df1=[Link]("renderedContent")
So, it becomes :[4786 rows x 11 columns]
7. Remove unnecessary characters by defining function
punct = ['%','/',':','\\','&','&',';','?']
def removepunctuations(text):
for punctuation in punct:
text = [Link](punctuation,'')
return text
8. Display and plot graphs for most common words by using TfidfVectorizer,
CountVectorizer
SMA Lab/VIII 16
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
Experiment No. 4
THEORY:
What is Exploratory Data Analysis?
We can define exploratory data analysis as the essential data investigation process
before the formal analysis to spot patterns and anomalies, discover trends, and test
hypotheses with summary statistics and visualizations. It gives an idea about the
data we will be digging deep into while analyzing. It aids in formulating how we
can handle data during analysis, like choosing models, handling outliers, deciding
model accuracy parameters, etc. Visualization helps to infer insights easily from
massive datasets.
1. Univariate Plots
Univariate plots show the frequency or the distribution shape of a variable.
2. Histograms
Histograms are two-dimensional plots in which the x-axis divide into a range of
numerical bins or time intervals. The y-axis shows the frequency values, which are
counts of occurrences of values for each bin. Bar graphs have gaps between the
bars to indicate that they compare distinct groups, but there are no gaps in
histograms. Hence, They tell us if the distribution is left/positively skew (most of
the data falls to the right side), right/negatively skewed (most of the data falls to the
left side), bi-modal (graphs having two distinct peaks), normal (perfectly
symmetrical without skew), or uniform (almost all the bins have similar
frequency).
SMA Lab/VIII 17
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
For a single random variable, probability distributions can be divided into two
types:
Bivariate Plots
Bivariate plots display the relationship between two variables in exploratory data
analysis.
Bar Graphs
Bar charts can be used to compare nominal or ordinal data. They are helpful for
recognizing trends.
SMA Lab/VIII 18
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
Scatter Plots
Scatter plots are commonly used in statistical analysis in order to visualize
numerical relationships. So, They are use in order to determine whether two
measures are correlate by plotting them on the x and y-axis. They are suitable for
recognizing trends.
For instance, you can see a scatter plot of two measures in the figure – the house’s
area against price and the trend line. The data points are concentrated in the lower
price and lower area range. A few outliers are indicating larger area houses
available for lower prices.
Box Plots
These charts show the distribution of values along an axis. Rectangular boxes are
used in order to bucket the data, giving us an idea of how the data points are spread
out. These boxes are also called quartiles which represent a quarter of a data set.
Boxes can be drawn vertically or horizontally.
SMA Lab/VIII 19
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
Box plots are suitable for identifying outliers. The below figure shows the structure
of a box plot.
Heat Maps
For instance, correlation heat maps show the interrelationship between variables—
areas as shaded as per the data’s values. So, Color differences can easily spot
similar and different values and make sense of the data variation. They are usually
helpful when you have a large amount of data. They are used during A/B testing to
see which parts of a web page are accessed by users on a website.
SMA Lab/VIII 20
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
Experiment No. 5
THEORY:
What Is Topic Analysis?
Topic analysis (also called topic detection, topic modeling, or topic extraction) is
a machine learning technique that organizes and understands large collections of
text data, by assigning “tags” or categories according to each individual text’s
topic or [Link] analysis uses natural language processing (NLP) to break
down human language so that you can find patterns and unlock semantic
structures within texts to extract insights and help make data-driven
[Link] two most common approaches for topic analysis with machine
learning are NLP topic modeling and NLP topic classification.
SMA Lab/VIII 21
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
transport, home automation, flame and smoke detection, safety, and
security. The algorithms can be implemented as software on general-purpose
machines, or as hardware in specialized video processing units.
SMA Lab/VIII 22
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
Experiment No. 6
AIM:Develop Structure based social media analytics model for any business.
( e.g. Structure Based Models -community detection, influence analysis)
Analysis of Facebook data
THEORY:
Structured analytics in social media is the process of discovering
the structure of the relationships emerging from this social media use. It focuses on
identifying the users involved, the activities they undertake, the actions they
perform, and the items (e.g., movies, restaurants, blogs, etc.) they create and
interact with. There are two key challenges facing these tasks: how to organize and
model social media content, which is often unstructured in its raw form, in order to
employ structured analytics on it; and how to employ analytics algorithms to
capture both explicit link-based relationships and implicit behavior-based
relationships.
Online social networks such as Weibo, Twitter, and Facebook provide valuable
platforms for information diffusion among their users. During this process, social
influence occurs when a person’s opinions, emotions, or behaviors are affected by
other people. Thus, changes occur in an individual’s attitudes, thoughts, feelings, or
behaviors as a result of interaction with other people or groups. Social influence
analysis (SIA) is becoming an important research field in social networks. SIA
mainly studies how to model the influence diffusion process in networks, and how
to propose an efficient method to identify a group of target nodes in a network.
• Import [Link]
SMA Lab/VIII 23
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
• G = [Link]()
• G.add_nodes_from([a,b,c])
• [Link]()
• G.add_edge(a,b)
• G.add_edge(a,c)
• [Link]()
• [Link](G)
• [Link]()
Degree Centrality
•To display the degree of each node in graph:
[Link](G)
• For computing degree centrality of each node:
nx.degree_centrality(G)
Closeness Centrality
Find the shortest path from the given node to other node
nx.shortest_path(G,’7’,’9’)
Betweenness centrality
Measures how important a node is to the shortest path through the network
nx.betweenness_centrality(G)
Eigenvector centrality
• Measures a node’s importance
• Links from important nodes
• Node’s influence nx.eigenvector_centrality(G)
CONCLUSION: Hence, we have successfully studied and demonstrated to
Develop Structure based social media analytics model for any business.
SMA Lab/VIII 24
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
Experiment No. 7
AIM:To Develop a dashboard and reporting tool based on real time social media
data.
THEORY:
What is a social media dashboard?
A social media dashboard monitors your social media performance metrics like
engagement, subscriber or follower count, and audience insights. Social media
dashboards bring together metrics from platforms like Facebook, Twitter, and
YouTube to display your social media marketing performance in a single view.
When you track your metrics on a social media dashboard, you have quick access
to insights that will help you make smart, data-driven marketing decisions.
Why should I use a social media dashboard?
A social media monitoring dashboard displays all your metrics in a single view.
Use your social media metrics to shape your marketing strategy, engage with your
audience, increase your conversion rates, and generate revenue. Social media
dashboards allow you to gain insight with a single glance and share your
performance with your team so you can stay on top of your social media strategies.
What should be on a social media dashboard?
The top social media metrics for data-driven marketers include:
Followers
Content Engagement
Reach
Impressions
Likes, Comments, and Shares
Post Clicks
Average Video Watch Time
Retweets and mentions
A social media dashboard is a platform that allows you to view all of your social
media activity in one place. This includes scheduling and creating posts, tracking
analytics, and interacting with your [Link] best social media dashboards
will also allow you to do things like track trending content, manage ad campaigns,
and analyze results across platforms. Not only does this make social media
marketing more efficient, but it also allows you to get a better understanding of
your overall social media performance — something that is nearly impossible to do
while toggling back-and-forth between native social media business profile
solutions.
Want to see how a social media dashboard works in action? The video below
shows an overview of the Hootsuite dashboard.
SMA Lab/VIII 25
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
SMA Lab/VIII 26
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
Experiment No. 8
AIM: To Design the creative content for promotion of your business on social
media using graphics tools such as Adobe Photoshop or Canva
THEORY:
Social media marketing can help increase brand awareness, brand
recognition, and sales while improving your relationships with customers. A
quality social media content plan can help you earn more followers and reach more
people. When used correctly, social media marketing can help take your brand to
the next level by reaching customers where they spend their time online.
What is a social media content plan?
Creating good social media content requires a plan. A social media content plan is part of
your overall marketing strategy; it helps you effectively plan the types of content you post
on different social media platforms depending on your audience. A content plan should
consist of the use of multiple types of content, including videos, blogs, eBooks, videos,
and content developed just for stories.
Steps to create a social media content plan:
1. Learn about your audience
2. Set goals
3. Perform competitive analysis
4. Gather content
5. Develop a content creation plan
6. Create a calendar
7. Evaluate content
Types of social media content to post:
1. Written posts, blogs, articles, guides, and more
2. Electronic books (eBooks)
3. Links to external content
4. Images
5. Video Stories
6. Testimonials and reviews
7. Announcements
SMA Lab/VIII 27
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
SMA Lab/VIII 28
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
Experiment No. 9
THEORY:
A competitive analysis is an analysis of your competition to find out
what their strengths and weaknesses are, and how those strengths and weaknesses compare
to your own.
It is a process of benchmarking your own results against the heavy-hitters in your industry,
so you can identify opportunities for growth as well as strategies that aren’t performing as
well as they should.
S – Strengths
W – Weaknesses
O– Opportunities
T – Threats
Step 4. Incorporate the latest data with social media monitoring
SMA Lab/VIII 29
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
CONCLUSION: Hence, we have successfully studied to analyse competitor
activities using social media data.
SMA Lab/VIII 30
Shivajirao S Jondhale College of Engineering, Dombivli (E)
Department of Computer Engineering
Experiment No. 10
AIM: To develop social media text analytics models for improving existing
product/ service by analyzing customer ‘s reviews/comments.
THEORY:
Text mining is the process of examining large collections of text
and converting the unstructured text data into structured data for further analysis
like visualization and model building. In this article, We will utilize the power of
text mining to do an in-depth analysis of customer reviews on an e-commerce
clothing site.
Customer reviews are a great source of “Voice of customer” and could offer
tremendous insights into what customers like and dislike about a product or
service. For the e-commerce business, customer reviews are very critical, since
existing reviews heavily influence buying decision of new customers in the absence
of the actual look and feel of the product to be purchased.
How to use text analytics to improve CX
Step 1: create dashboards to see the data that matters the most
Step 2: analyze data to avoid losing customers
Step 3: get insights on what your customer thinks about specific areas
Step 4: discover hidden trends the moment they arise
Step 5: understand what your customers think about support staff
A strong customer analytics process helps you understand who your customers are,
how they behave, and how satisfied they are with your company or product
experience. Customer analytics are as important as financial reports in gauging the
health of your [Link] analytics dashboards and reports can track team
performance, identify bottlenecks before a process breaks, and measure customer
satisfaction (CSAT) on an ongoing basis. This data can help you build efficiencies,
understand customer needs and behaviors, and resolve problems faster — or
eliminate them altogether.
What is review analysis?
Review analysis is the process of transforming unstructured review data to
structured data that can be used to guide decision-making.
A few of the primary uses include:
Product feature ideas: scanning product reviews for sentiment on desired
features
Roadmap prioritization: determining what the dev team should focus on
first
SMA Lab/VIII 32