Skip to content

Instantly share code, notes, and snippets.

1. Introduction to Social Media
A. Identify and categorize real-world examples of social media data (textual, image, video) and explain their use in analytics.
B. Using Hootsuite or Buffer, create a sample post and measure its potential reach and engagement metrics.
C. Analyze the concept of the Long Tail in social media by identifying niche vs. popular topics on Twitter or YouTube.
2. Types of Social Media Analytics
A. Apply Google Analytics to a demo website and capture visitor demographics, location, and session data.
Prac 1
Water_Jug_Problem.py
from collections import deque
def water_jug_bfs():
A, B, goal = 4, 3, 2
visited, q = set(), deque([(0, 0)])
Practical 10) Electronic Word-of-Mouth (eWOM)
A. Analyze the role of eWOM by studying product reviews on an e-commerce platform like Amazon
import pandas as pd
import matplotlib.pyplot as plt
Practical 9) Theories in Media Research
A. Apply the Agenda-setting theory to a real-world social media campaign and evaluate its impact on public opinion
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from textblob import TextBlob
Practical 8) Google Analytics
B. Analyze a sample dataset of a website traffic to identify the most visited pages and user flow
import pandas as pd
import matplotlib.pyplot as plt
Practical 7 ) Recommender Systems in Social Media
A. Perform association rule mining to discover common product purchased together based on dataset
!pip install pandas mlxtend
Practical 6 ) Text Analytics in Social Media
A. Use python to preprocess a dataset of tweets by removing hashtags, mentions and URLS
import pandas as pd
import re
df = pd.read_csv('/content/Book1.csv', encoding='latin1')
Practical 5 ) Social Network Analysis
A. Create a network graph of Twitter interactions (mentions and retweets) using NetworkX and Identify influential users
!pip install tweepy
Practical 4 ) Social Media Intelligence and Listening
B. Perform sentiment analysis of tweets related to a trending topic using a python library like TextBlob or NLTK
!pip install textblob
Practical 3 ) Social Media Data and Metrics
A. Extract and analyze engagement metrics from a YouTube video using a dataset of likes, comments, and views.
import pandas as pd
import seaborn as sn