SAMANTUS Python for Data Analytics — Complete Training Manual CAPSTONE PROJECT 12
← Back to Course Index

Social Media Analytics


On This Page

Capstone Project 12: Social Media Analytics


C12.1  Project Overview

This project analyzes engagement rates across multiple social platforms and tracks subscriber growth over time — directly relevant to growing a personal brand like the Samantus YouTube channel.

C12.2  Business Problem

A content creator posts across 5 platforms and wants to know which platform actually drives the best engagement, so they can focus their limited time and content effort more effectively.

C12.3  Dataset Description

ColumnDescription
platformSocial media platform
engagement_rateLikes+Comments+Shares / Followers, as %
weekWeek number of tracking period
followersTotal follower/subscriber count for that week

Sample scope: 12 weeks of engagement and growth tracking across 5 platforms.

C12.4  Objectives


C12.5  Step-by-Step Solution

C12.6  Complete Python Code

► social_media_analytics.py
import pandas as pd
import matplotlib.pyplot as plt

df = pd.read_csv("social_media_data.csv")

engagement_by_platform = df.groupby('platform')['engagement_rate'].mean().sort_values(ascending=False)
print("Average Engagement Rate by Platform:\n", engagement_by_platform.round(1))

youtube = df[df["platform"]=="YouTube"].sort_values("week")
youtube['growth_pct'] = youtube['followers'].pct_change() * 100
print("Weekly Growth %:\n", youtube[["week","growth_pct"]].round(1))

plt.plot(youtube["week"], youtube["followers"], marker="o")
plt.title("YouTube Subscriber Growth")
plt.savefig("growth_line.png")

C12.7  Expected Output

Output
Average Engagement Rate by Platform:
Instagram   8.2
YouTube     6.5
LinkedIn    4.8
Facebook    3.1
Twitter/X  2.9

C12.8  Visualizations

Figure C12.1 — Average engagement rate by platform.
Figure C12.1 — Average engagement rate by platform.
Figure C12.2 — YouTube subscriber growth over 12 weeks.
Figure C12.2 — YouTube subscriber growth over 12 weeks.

C12.9  Key Insights

C12.10  Business Recommendations

✓ Instructor Tip
This project is a great template for students to adapt using their own or their institute's real social media analytics data — an ideal capstone for aspiring content creators.