Not seeing a result you expected?
Learn how you can add new datasets to our index.
Facebook
TwitterApache License, v2.0https://www.apache.org/licenses/LICENSE-2.0
License information was derived automatically
This dataset tracks influencer marketing campaigns across major social media platforms, providing a robust foundation for analyzing campaign effectiveness, engagement, reach, and sales outcomes. Each record represents a unique campaign and includes details such as the campaign’s platform (Instagram, YouTube, TikTok, Twitter), influencer category (e.g., Fashion, Tech, Fitness), campaign type (Product Launch, Brand Awareness, Giveaway, etc.), start and end dates, total user engagements, estimated reach, product sales, and campaign duration. The dataset structure supports diverse analyses, including ROI calculation, campaign benchmarking, and influencer performance comparison.
Columns:
- campaign_id: Unique identifier for each campaign
- platform: Social media platform where the campaign ran
- influencer_category: Niche or industry focus of the influencer
- campaign_type: Objective or style of the campaign
- start_date, end_date: Campaign time frame
- engagements: Total user interactions (likes, comments, shares, etc.)
- estimated_reach: Estimated number of unique users exposed to the campaign
- product_sales: Number of products sold as a result of the campaign
- campaign_duration_days: Duration of the campaign in days
import pandas as pd
df = pd.read_csv('influencer_marketing_roi_dataset.csv', parse_dates=['start_date', 'end_date'])
print(df.head())
print(df.info())
# Overview of campaign types and platforms
print(df['campaign_type'].value_counts())
print(df['platform'].value_counts())
# Summary statistics
print(df[['engagements', 'estimated_reach', 'product_sales']].describe())
# Average engagements and sales by platform
platform_stats = df.groupby('platform')[['engagements', 'product_sales']].mean()
print(platform_stats)
# Top influencer categories by product sales
top_categories = df.groupby('influencer_category')['product_sales'].sum().sort_values(ascending=False)
print(top_categories)
# Assume a fixed campaign cost for demonstration
df['campaign_cost'] = 500 + df['estimated_reach'] * 0.01 # Example formula
# Calculate ROI: (Revenue - Cost) / Cost
# Assume each product sold yields $40 revenue
df['revenue'] = df['product_sales'] * 40
df['roi'] = (df['revenue'] - df['campaign_cost']) / df['campaign_cost']
# View campaigns with highest ROI
top_roi = df.sort_values('roi', ascending=False).head(10)
print(top_roi[['campaign_id', 'platform', 'roi']])
import matplotlib.pyplot as plt
import seaborn as sns
# Engagements vs. Product Sales scatter plot
plt.figure(figsize=(8,6))
sns.scatterplot(data=df, x='engagements', y='product_sales', hue='platform', alpha=0.6)
plt.title('Engagements vs. Product Sales by Platform')
plt.xlabel('Engagements')
plt.ylabel('Product Sales')
plt.legend()
plt.show()
# Average ROI by Influencer Category
category_roi = df.groupby('influencer_category')['roi'].mean().sort_values()
category_roi.plot(kind='barh', color='teal')
plt.title('Average ROI by Influencer Category')
plt.xlabel('Average ROI')
plt.show()
# Campaigns over time
df['month'] = df['start_date'].dt.to_period('M')
monthly_sales = df.groupby('month')['product_sales'].sum()
monthly_sales.plot(figsize=(10,4), marker='o', title='Monthly Product Sales from Influencer Campaigns')
plt.ylabel('Product Sales')
plt.show()