Topic 91 of

Social Media Analytics — Engagement Metrics & Growth Analysis

Every brand needs social media analytics. This project shows: 'Posts at 7 PM get 3× engagement vs 10 AM' — actionable insights that showcase your analytical skills.

📚Intermediate
⏱️17 min
5 quizzes
📊

Key Social Media Metrics

Essential Metrics:

| Metric | Formula | What It Measures | |--------|---------|------------------| | Engagement Rate | (Likes + Comments + Shares) / Followers × 100 | Content resonance | | Reach | Unique users who saw post | Audience size | | Impressions | Total times post was viewed | Visibility (includes repeats) | | Click-Through Rate (CTR) | Clicks / Impressions × 100 | Call-to-action effectiveness | | Follower Growth Rate | (New Followers / Total Followers) × 100 | Audience growth speed | | Share of Voice | Your mentions / Total industry mentions | Brand awareness vs competitors |

Python Analysis:

code.pyPython
import pandas as pd
import matplotlib.pyplot as plt

# Sample social media data
data = {
    'post_id': range(1, 101),
    'date': pd.date_range('2026-01-01', periods=100),
    'likes': np.random.randint(100, 1000, 100),
    'comments': np.random.randint(10, 100, 100),
    'shares': np.random.randint(5, 50, 100),
    'reach': np.random.randint(5000, 20000, 100),
    'followers': 50000  # Current followers
}

df = pd.DataFrame(data)

# Calculate engagement rate
df['total_engagement'] = df['likes'] + df['comments'] + df['shares']
df['engagement_rate'] = (df['total_engagement'] / df['followers']) * 100

print(f"Avg Engagement Rate: {df['engagement_rate'].mean():.2f}%")
print(f"Best Post: {df['engagement_rate'].max():.2f}%")
🔍

Analysis Types

1. Content Performance:

code.pyPython
# Find best performing content types
content_performance = df.groupby('content_type').agg({
    'engagement_rate': 'mean',
    'reach': 'mean',
    'post_id': 'count'
}).rename(columns={'post_id': 'post_count'})

print(content_performance.sort_values('engagement_rate', ascending=False))

2. Posting Time Analysis:

code.pyPython
df['hour'] = df['date'].dt.hour
df['day_of_week'] = df['date'].dt.day_name()

# Best hours to post
hourly_engagement = df.groupby('hour')['engagement_rate'].mean()
print(f"Best hour to post: {hourly_engagement.idxmax()}:00")

# Best days
daily_engagement = df.groupby('day_of_week')['engagement_rate'].mean()
print(daily_engagement.sort_values(ascending=False))

3. Growth Tracking:

code.pyPython
# Follower growth over time
monthly_growth = df.resample('M', on='date')['followers'].last()
growth_rate = monthly_growth.pct_change() * 100

plt.figure(figsize=(12, 6))
growth_rate.plot(kind='line', marker='o')
plt.title('Monthly Follower Growth Rate')
plt.ylabel('Growth %')
plt.xlabel('Month')
plt.grid(True, alpha=0.3)
plt.show()

⚠️ CheckpointQuiz error: Missing or invalid options array

💡

Actionable Insights

Sample Findings:

  1. Optimal Posting Time: 7-9 PM weekdays has 3× engagement vs 10 AM
  2. Content Type: Video posts get 2× engagement vs images
  3. Caption Length: 100-150 characters outperform long-form
  4. Hashtag Sweet Spot: 5-7 hashtags optimal (more = spam)
  5. Frequency: 1 post/day maintains engagement; 3+/day sees diminishing returns

Recommendations:

  • Schedule posts for 7-9 PM (when audience is active)
  • Prioritize video content (higher engagement)
  • Keep captions concise (100-150 chars)
  • Use 5-7 relevant hashtags per post
  • Maintain consistent daily posting

⚠️ FinalQuiz error: Missing or invalid questions array

⚠️ SummarySection error: Missing or invalid items array

Received: {"hasItems":false,"isArray":false}