373.How Can Influencer Popularity and Earnings Be Analyzed Using SAS Programming?
How Can Influencer Popularity and Earnings Be Analyzed Using SAS Programming?
1. BUSINESS CONTEXT & PROJECT OVERVIEW
Why Influencer Data?
In
today’s digital economy, social media influencers play a critical role
in:
- Brand promotion
- Consumer trust building
- Product launches
- Affiliate marketing
- Digital advertising ROI
Companies
analyze influencers based on:
- Platform (Instagram,
YouTube, Twitter/X, TikTok)
- Followers
- Engagement rate
- Earnings
- Country reach
- Activity duration
This
project simulates a real-world influencer analytics system, similar to
what marketing analytics teams or data scientists would build.
2. LEARNING OBJECTIVES
By completing this project, you will learn:
·
How to create
structured datasets
·
Use SAS
date functions: MDY, INTCK, INTNX
·
Apply data
standardization using:
o UPCASE
o LOWCASE
o PROPCASE
·
Perform data
analysis using:
o PROC SQL
o PROC MEANS
·
Create visual
analytics using PROC SGPLOT
·
Implement macros
for dynamic classification
·
Use SET,
MERGE, APPEND, TRANSPOSE
·
Apply SAS
system options
·
Understand business meaning of analytics
3. SAS OPTIONS
Why these options?
· NODATE → Clean output
·
NONUMBER → No page numbers
·
MPRINT → Shows macro-generated SAS code
·
MLOGIC → Shows macro logic flow
·
SYMBOLGEN → Displays macro variable
values
Used extensively in production environments and validation teams.
4. RAW INFLUENCER DATA CREATION
Step 1: Base Dataset
data influencers_raw;
length Name $25 Platform $15 Country $20;
format Join_Date date9.;
input Name $ Platform $ Followers Engagement_Rate Earnings Country $
Join_Date : date9.;
datalines;
AmitSharma Instagram 1200000 4.5 85000 India 15JAN2019
SaraKhan YouTube 980000 6.2 120000 India 20FEB2018
JohnDoe TikTok 2200000 8.1 200000 USA 10MAR2020
EmilyRose Instagram 1500000 5.4 130000 UK 05APR2019
CarlosMendez YouTube 1100000 6.9 140000 Mexico 12MAY2017
LiWei TikTok 3000000 9.3 250000 China 18JUN2021
FatimaAli Instagram 800000 4.1 70000 UAE 25JUL2018
RajVerma Twitter 600000 3.5 45000 India 30AUG2016
AnnaSmith YouTube 1750000 7.8 180000 USA 02SEP2017
NoahBrown Instagram 900000 4.8 95000 Canada 14OCT2019
SophiaLee TikTok 2600000 8.7 230000 SouthKorea 21NOV2020
MohammedZain Instagram 500000 3.9 40000 SaudiArabia 11DEC2015
LucasMartin Twitter 750000 4.0 60000 France 07JAN2018
PriyaNair YouTube 1250000 6.5 150000 India 19FEB2019
DavidWilson Instagram 2000000 5.9 210000 Australia 28MAR2020
;
run;
proc print data=influencers_raw;
run;
OUTPUT:
| Obs | Name | Platform | Country | Join_Date | Followers | Engagement_Rate | Earnings |
|---|---|---|---|---|---|---|---|
| 1 | AmitSharma | India | 15JAN2019 | 1200000 | 4.5 | 85000 | |
| 2 | SaraKhan | YouTube | India | 20FEB2018 | 980000 | 6.2 | 120000 |
| 3 | JohnDoe | TikTok | USA | 10MAR2020 | 2200000 | 8.1 | 200000 |
| 4 | EmilyRose | UK | 05APR2019 | 1500000 | 5.4 | 130000 | |
| 5 | CarlosMendez | YouTube | Mexico | 12MAY2017 | 1100000 | 6.9 | 140000 |
| 6 | LiWei | TikTok | China | 18JUN2021 | 3000000 | 9.3 | 250000 |
| 7 | FatimaAli | UAE | 25JUL2018 | 800000 | 4.1 | 70000 | |
| 8 | RajVerma | India | 30AUG2016 | 600000 | 3.5 | 45000 | |
| 9 | AnnaSmith | YouTube | USA | 02SEP2017 | 1750000 | 7.8 | 180000 |
| 10 | NoahBrown | Canada | 14OCT2019 | 900000 | 4.8 | 95000 | |
| 11 | SophiaLee | TikTok | SouthKorea | 21NOV2020 | 2600000 | 8.7 | 230000 |
| 12 | MohammedZain | SaudiArabia | 11DEC2015 | 500000 | 3.9 | 40000 | |
| 13 | LucasMartin | France | 07JAN2018 | 750000 | 4.0 | 60000 | |
| 14 | PriyaNair | YouTube | India | 19FEB2019 | 1250000 | 6.5 | 150000 |
| 15 | DavidWilson | Australia | 28MAR2020 | 2000000 | 5.9 | 210000 |
5. DATA STANDARDIZATION (TEXT FUNCTIONS)
data influencers_clean;
set influencers_raw;
Name_Proper = propcase(Name);
Platform_Upper = upcase(Platform);
Country_Lower = lowcase(Country);
run;
proc print data=influencers_clean;
run;
OUTPUT:
| Obs | Name | Platform | Country | Join_Date | Followers | Engagement_Rate | Earnings | Name_Proper | Platform_Upper | Country_Lower |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | AmitSharma | India | 15JAN2019 | 1200000 | 4.5 | 85000 | Amitsharma | india | ||
| 2 | SaraKhan | YouTube | India | 20FEB2018 | 980000 | 6.2 | 120000 | Sarakhan | YOUTUBE | india |
| 3 | JohnDoe | TikTok | USA | 10MAR2020 | 2200000 | 8.1 | 200000 | Johndoe | TIKTOK | usa |
| 4 | EmilyRose | UK | 05APR2019 | 1500000 | 5.4 | 130000 | Emilyrose | uk | ||
| 5 | CarlosMendez | YouTube | Mexico | 12MAY2017 | 1100000 | 6.9 | 140000 | Carlosmendez | YOUTUBE | mexico |
| 6 | LiWei | TikTok | China | 18JUN2021 | 3000000 | 9.3 | 250000 | Liwei | TIKTOK | china |
| 7 | FatimaAli | UAE | 25JUL2018 | 800000 | 4.1 | 70000 | Fatimaali | uae | ||
| 8 | RajVerma | India | 30AUG2016 | 600000 | 3.5 | 45000 | Rajverma | india | ||
| 9 | AnnaSmith | YouTube | USA | 02SEP2017 | 1750000 | 7.8 | 180000 | Annasmith | YOUTUBE | usa |
| 10 | NoahBrown | Canada | 14OCT2019 | 900000 | 4.8 | 95000 | Noahbrown | canada | ||
| 11 | SophiaLee | TikTok | SouthKorea | 21NOV2020 | 2600000 | 8.7 | 230000 | Sophialee | TIKTOK | southkorea |
| 12 | MohammedZain | SaudiArabia | 11DEC2015 | 500000 | 3.9 | 40000 | Mohammedzain | saudiarabia | ||
| 13 | LucasMartin | France | 07JAN2018 | 750000 | 4.0 | 60000 | Lucasmartin | france | ||
| 14 | PriyaNair | YouTube | India | 19FEB2019 | 1250000 | 6.5 | 150000 | Priyanair | YOUTUBE | india |
| 15 | DavidWilson | Australia | 28MAR2020 | 2000000 | 5.9 | 210000 | Davidwilson | australia |
Why this is critical?
In real
industry datasets:
·
Text comes in mixed formats
·
Causes join failures
·
Causes reporting inconsistencies
Standardization avoids data quality issues.
6. DATE DERIVATIONS (MDY, INTCK, INTNX)
data influencers_dates;
set influencers_clean;
Analysis_Date = mdy(1,1,2026);
Years_Active = intck('year', Join_Date, Analysis_Date);
Next_Review_Date = intnx('month', Analysis_Date, 6, 'same');
format Analysis_Date Next_Review_Date date9.;
run;
proc print data=influencers_dates;
run;
OUTPUT:
| Obs | Name | Platform | Country | Join_Date | Followers | Engagement_Rate | Earnings | Name_Proper | Platform_Upper | Country_Lower | Analysis_Date | Years_Active | Next_Review_Date |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | AmitSharma | India | 15JAN2019 | 1200000 | 4.5 | 85000 | Amitsharma | india | 01JAN2026 | 7 | 01JUL2026 | ||
| 2 | SaraKhan | YouTube | India | 20FEB2018 | 980000 | 6.2 | 120000 | Sarakhan | YOUTUBE | india | 01JAN2026 | 8 | 01JUL2026 |
| 3 | JohnDoe | TikTok | USA | 10MAR2020 | 2200000 | 8.1 | 200000 | Johndoe | TIKTOK | usa | 01JAN2026 | 6 | 01JUL2026 |
| 4 | EmilyRose | UK | 05APR2019 | 1500000 | 5.4 | 130000 | Emilyrose | uk | 01JAN2026 | 7 | 01JUL2026 | ||
| 5 | CarlosMendez | YouTube | Mexico | 12MAY2017 | 1100000 | 6.9 | 140000 | Carlosmendez | YOUTUBE | mexico | 01JAN2026 | 9 | 01JUL2026 |
| 6 | LiWei | TikTok | China | 18JUN2021 | 3000000 | 9.3 | 250000 | Liwei | TIKTOK | china | 01JAN2026 | 5 | 01JUL2026 |
| 7 | FatimaAli | UAE | 25JUL2018 | 800000 | 4.1 | 70000 | Fatimaali | uae | 01JAN2026 | 8 | 01JUL2026 | ||
| 8 | RajVerma | India | 30AUG2016 | 600000 | 3.5 | 45000 | Rajverma | india | 01JAN2026 | 10 | 01JUL2026 | ||
| 9 | AnnaSmith | YouTube | USA | 02SEP2017 | 1750000 | 7.8 | 180000 | Annasmith | YOUTUBE | usa | 01JAN2026 | 9 | 01JUL2026 |
| 10 | NoahBrown | Canada | 14OCT2019 | 900000 | 4.8 | 95000 | Noahbrown | canada | 01JAN2026 | 7 | 01JUL2026 | ||
| 11 | SophiaLee | TikTok | SouthKorea | 21NOV2020 | 2600000 | 8.7 | 230000 | Sophialee | TIKTOK | southkorea | 01JAN2026 | 6 | 01JUL2026 |
| 12 | MohammedZain | SaudiArabia | 11DEC2015 | 500000 | 3.9 | 40000 | Mohammedzain | saudiarabia | 01JAN2026 | 11 | 01JUL2026 | ||
| 13 | LucasMartin | France | 07JAN2018 | 750000 | 4.0 | 60000 | Lucasmartin | france | 01JAN2026 | 8 | 01JUL2026 | ||
| 14 | PriyaNair | YouTube | India | 19FEB2019 | 1250000 | 6.5 | 150000 | Priyanair | YOUTUBE | india | 01JAN2026 | 7 | 01JUL2026 |
| 15 | DavidWilson | Australia | 28MAR2020 | 2000000 | 5.9 | 210000 | Davidwilson | australia | 01JAN2026 | 6 | 01JUL2026 |
Explanation:
|
Function |
Purpose |
|
MDY |
Create
a fixed analysis date |
|
INTCK |
Calculate
difference between dates |
|
INTNX |
Move
forward/backward in time |
7. MACRO FOR POPULARITY GROUPING
Business Logic:
|
Followers |
Category |
|
<
500K |
Emerging |
|
500K–1.5M |
Growing |
|
>
1.5M |
Mega |
Macro Code:
%macro popularity_group(input=, output=);
data &output;
set &input;
length Popularity $10;
if Followers < 500000 then Popularity = "Emerging";
else if 500000 <= Followers <= 1500000 then Popularity = "Growing";
else Popularity = "Mega";
run;
proc print data=&output;
run;
%mend popularity_group;
%popularity_group(input=influencers_dates, output=influencers_final);
OUTPUT:
| Obs | Name | Platform | Country | Join_Date | Followers | Engagement_Rate | Earnings | Name_Proper | Platform_Upper | Country_Lower | Analysis_Date | Years_Active | Next_Review_Date | Popularity |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | AmitSharma | India | 15JAN2019 | 1200000 | 4.5 | 85000 | Amitsharma | india | 01JAN2026 | 7 | 01JUL2026 | Growing | ||
| 2 | SaraKhan | YouTube | India | 20FEB2018 | 980000 | 6.2 | 120000 | Sarakhan | YOUTUBE | india | 01JAN2026 | 8 | 01JUL2026 | Growing |
| 3 | JohnDoe | TikTok | USA | 10MAR2020 | 2200000 | 8.1 | 200000 | Johndoe | TIKTOK | usa | 01JAN2026 | 6 | 01JUL2026 | Mega |
| 4 | EmilyRose | UK | 05APR2019 | 1500000 | 5.4 | 130000 | Emilyrose | uk | 01JAN2026 | 7 | 01JUL2026 | Growing | ||
| 5 | CarlosMendez | YouTube | Mexico | 12MAY2017 | 1100000 | 6.9 | 140000 | Carlosmendez | YOUTUBE | mexico | 01JAN2026 | 9 | 01JUL2026 | Growing |
| 6 | LiWei | TikTok | China | 18JUN2021 | 3000000 | 9.3 | 250000 | Liwei | TIKTOK | china | 01JAN2026 | 5 | 01JUL2026 | Mega |
| 7 | FatimaAli | UAE | 25JUL2018 | 800000 | 4.1 | 70000 | Fatimaali | uae | 01JAN2026 | 8 | 01JUL2026 | Growing | ||
| 8 | RajVerma | India | 30AUG2016 | 600000 | 3.5 | 45000 | Rajverma | india | 01JAN2026 | 10 | 01JUL2026 | Growing | ||
| 9 | AnnaSmith | YouTube | USA | 02SEP2017 | 1750000 | 7.8 | 180000 | Annasmith | YOUTUBE | usa | 01JAN2026 | 9 | 01JUL2026 | Mega |
| 10 | NoahBrown | Canada | 14OCT2019 | 900000 | 4.8 | 95000 | Noahbrown | canada | 01JAN2026 | 7 | 01JUL2026 | Growing | ||
| 11 | SophiaLee | TikTok | SouthKorea | 21NOV2020 | 2600000 | 8.7 | 230000 | Sophialee | TIKTOK | southkorea | 01JAN2026 | 6 | 01JUL2026 | Mega |
| 12 | MohammedZain | SaudiArabia | 11DEC2015 | 500000 | 3.9 | 40000 | Mohammedzain | saudiarabia | 01JAN2026 | 11 | 01JUL2026 | Growing | ||
| 13 | LucasMartin | France | 07JAN2018 | 750000 | 4.0 | 60000 | Lucasmartin | france | 01JAN2026 | 8 | 01JUL2026 | Growing | ||
| 14 | PriyaNair | YouTube | India | 19FEB2019 | 1250000 | 6.5 | 150000 | Priyanair | YOUTUBE | india | 01JAN2026 | 7 | 01JUL2026 | Growing |
| 15 | DavidWilson | Australia | 28MAR2020 | 2000000 | 5.9 | 210000 | Davidwilson | australia | 01JAN2026 | 6 | 01JUL2026 | Mega |
8. PROC SQL – BUSINESS QUERIES
Average Earnings by Platform
proc sql;
create table earnings_platform as
select Platform_Upper,
avg(Earnings) as Avg_Earnings format=dollar12.
from influencers_final
group by Platform_Upper;
quit;
proc print data=earnings_platform;
run;
OUTPUT:
| Obs | Platform_Upper | Avg_Earnings |
|---|---|---|
| 1 | $105,000 | |
| 2 | TIKTOK | $226,667 |
| 3 | $52,500 | |
| 4 | YOUTUBE | $147,500 |
Top Influencers by Engagement
proc sql;
create table top_engagement as
select Name_Proper, Platform_Upper, Engagement_Rate
from influencers_final
where Engagement_Rate > 7;
quit;
proc print data=top_engagement;
run;
OUTPUT:
| Obs | Name_Proper | Platform_Upper | Engagement_Rate |
|---|---|---|---|
| 1 | Johndoe | TIKTOK | 8.1 |
| 2 | Liwei | TIKTOK | 9.3 |
| 3 | Annasmith | YOUTUBE | 7.8 |
| 4 | Sophialee | TIKTOK | 8.7 |
9. PROC MEANS – STATISTICAL SUMMARY
proc means data=influencers_final mean min max;
class Platform_Upper;
var Followers Engagement_Rate Earnings Years_Active;
run;
OUTPUT:
The MEANS Procedure
| Platform_Upper | N Obs | Variable | Mean | Minimum | Maximum |
|---|---|---|---|---|---|
| 6 | Followers Engagement_Rate Earnings Years_Active | 1150000.00 4.7666667 105000.00 7.6666667 | 500000.00 3.9000000 40000.00 6.0000000 | 2000000.00 5.9000000 210000.00 11.0000000 | |
| TIKTOK | 3 | Followers Engagement_Rate Earnings Years_Active | 2600000.00 8.7000000 226666.67 5.6666667 | 2200000.00 8.1000000 200000.00 5.0000000 | 3000000.00 9.3000000 250000.00 6.0000000 |
| 2 | Followers Engagement_Rate Earnings Years_Active | 675000.00 3.7500000 52500.00 9.0000000 | 600000.00 3.5000000 45000.00 8.0000000 | 750000.00 4.0000000 60000.00 10.0000000 | |
| YOUTUBE | 4 | Followers Engagement_Rate Earnings Years_Active | 1270000.00 6.8500000 147500.00 8.2500000 | 980000.00 6.2000000 120000.00 7.0000000 | 1750000.00 7.8000000 180000.00 9.0000000 |
Why PROC MEANS?
·
Core clinical
+ commercial analytics tool
·
Used in:
o Financial
summaries
o Marketing
reports
o Regulatory
tables
10. PROC SGPLOT – VISUAL ANALYTICS
Followers vs Earnings
proc sgplot data=influencers_final;
scatter x=Followers y=Earnings;
title "Followers vs Earnings Analysis";
run;
OUTPUT:
Earnings by Platform
proc sgplot data=influencers_final;
vbar Platform_Upper / response=Earnings stat=mean;
title "Average Earnings by Platform";
run;
OUTPUT:
11. APPEND, SET, MERGE OPERATIONS
APPEND (New Influencers)
data new_influencers;
length Name_Proper $25 Platform_Upper $15 Country_Lower $20 Popularity $10;
format Join_Date Analysis_Date Next_Review_Date date9.;
Name_Proper = "DemoUser";
Platform_Upper = "INSTAGRAM";
Followers = 450000;
Engagement_Rate = 5.6;
Earnings = 55000;
Country_Lower = "india";
Join_Date = '15JAN2023'd;
Analysis_Date = mdy(1,1,2026);
Years_Active = intck('year', Join_Date, Analysis_Date);
Next_Review_Date= intnx('month', Analysis_Date, 6, 'same');
Popularity = "Emerging";
run;
proc print data=new_influencers;
run;
OUTPUT:
| Obs | Name_Proper | Platform_Upper | Country_Lower | Popularity | Join_Date | Analysis_Date | Next_Review_Date | Followers | Engagement_Rate | Earnings | Years_Active |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | DemoUser | india | Emerging | 15JAN2023 | 01JAN2026 | 01JUL2026 | 450000 | 5.6 | 55000 | 3 |
proc append base=influencers_final
data=new_influencers force;
run;
proc print data=influencers_final;
run;
OUTPUT:
| Obs | Name | Platform | Country | Join_Date | Followers | Engagement_Rate | Earnings | Name_Proper | Platform_Upper | Country_Lower | Analysis_Date | Years_Active | Next_Review_Date | Popularity |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | AmitSharma | India | 15JAN2019 | 1200000 | 4.5 | 85000 | Amitsharma | india | 01JAN2026 | 7 | 01JUL2026 | Growing | ||
| 2 | SaraKhan | YouTube | India | 20FEB2018 | 980000 | 6.2 | 120000 | Sarakhan | YOUTUBE | india | 01JAN2026 | 8 | 01JUL2026 | Growing |
| 3 | JohnDoe | TikTok | USA | 10MAR2020 | 2200000 | 8.1 | 200000 | Johndoe | TIKTOK | usa | 01JAN2026 | 6 | 01JUL2026 | Mega |
| 4 | EmilyRose | UK | 05APR2019 | 1500000 | 5.4 | 130000 | Emilyrose | uk | 01JAN2026 | 7 | 01JUL2026 | Growing | ||
| 5 | CarlosMendez | YouTube | Mexico | 12MAY2017 | 1100000 | 6.9 | 140000 | Carlosmendez | YOUTUBE | mexico | 01JAN2026 | 9 | 01JUL2026 | Growing |
| 6 | LiWei | TikTok | China | 18JUN2021 | 3000000 | 9.3 | 250000 | Liwei | TIKTOK | china | 01JAN2026 | 5 | 01JUL2026 | Mega |
| 7 | FatimaAli | UAE | 25JUL2018 | 800000 | 4.1 | 70000 | Fatimaali | uae | 01JAN2026 | 8 | 01JUL2026 | Growing | ||
| 8 | RajVerma | India | 30AUG2016 | 600000 | 3.5 | 45000 | Rajverma | india | 01JAN2026 | 10 | 01JUL2026 | Growing | ||
| 9 | AnnaSmith | YouTube | USA | 02SEP2017 | 1750000 | 7.8 | 180000 | Annasmith | YOUTUBE | usa | 01JAN2026 | 9 | 01JUL2026 | Mega |
| 10 | NoahBrown | Canada | 14OCT2019 | 900000 | 4.8 | 95000 | Noahbrown | canada | 01JAN2026 | 7 | 01JUL2026 | Growing | ||
| 11 | SophiaLee | TikTok | SouthKorea | 21NOV2020 | 2600000 | 8.7 | 230000 | Sophialee | TIKTOK | southkorea | 01JAN2026 | 6 | 01JUL2026 | Mega |
| 12 | MohammedZain | SaudiArabia | 11DEC2015 | 500000 | 3.9 | 40000 | Mohammedzain | saudiarabia | 01JAN2026 | 11 | 01JUL2026 | Growing | ||
| 13 | LucasMartin | France | 07JAN2018 | 750000 | 4.0 | 60000 | Lucasmartin | france | 01JAN2026 | 8 | 01JUL2026 | Growing | ||
| 14 | PriyaNair | YouTube | India | 19FEB2019 | 1250000 | 6.5 | 150000 | Priyanair | YOUTUBE | india | 01JAN2026 | 7 | 01JUL2026 | Growing |
| 15 | DavidWilson | Australia | 28MAR2020 | 2000000 | 5.9 | 210000 | Davidwilson | australia | 01JAN2026 | 6 | 01JUL2026 | Mega | ||
| 16 | 15JAN2023 | 450000 | 5.6 | 55000 | DemoUser | india | 01JAN2026 | 3 | 01JUL2026 | Emerging |
MERGE Example
proc sort data=influencers_final; by Platform_Upper; run;
run;
proc print data=influencers_final;
run;
OUTPUT:
| Obs | Name | Platform | Country | Join_Date | Followers | Engagement_Rate | Earnings | Name_Proper | Platform_Upper | Country_Lower | Analysis_Date | Years_Active | Next_Review_Date | Popularity |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | AmitSharma | India | 15JAN2019 | 1200000 | 4.5 | 85000 | Amitsharma | india | 01JAN2026 | 7 | 01JUL2026 | Growing | ||
| 2 | EmilyRose | UK | 05APR2019 | 1500000 | 5.4 | 130000 | Emilyrose | uk | 01JAN2026 | 7 | 01JUL2026 | Growing | ||
| 3 | FatimaAli | UAE | 25JUL2018 | 800000 | 4.1 | 70000 | Fatimaali | uae | 01JAN2026 | 8 | 01JUL2026 | Growing | ||
| 4 | NoahBrown | Canada | 14OCT2019 | 900000 | 4.8 | 95000 | Noahbrown | canada | 01JAN2026 | 7 | 01JUL2026 | Growing | ||
| 5 | MohammedZain | SaudiArabia | 11DEC2015 | 500000 | 3.9 | 40000 | Mohammedzain | saudiarabia | 01JAN2026 | 11 | 01JUL2026 | Growing | ||
| 6 | DavidWilson | Australia | 28MAR2020 | 2000000 | 5.9 | 210000 | Davidwilson | australia | 01JAN2026 | 6 | 01JUL2026 | Mega | ||
| 7 | 15JAN2023 | 450000 | 5.6 | 55000 | DemoUser | india | 01JAN2026 | 3 | 01JUL2026 | Emerging | ||||
| 8 | JohnDoe | TikTok | USA | 10MAR2020 | 2200000 | 8.1 | 200000 | Johndoe | TIKTOK | usa | 01JAN2026 | 6 | 01JUL2026 | Mega |
| 9 | LiWei | TikTok | China | 18JUN2021 | 3000000 | 9.3 | 250000 | Liwei | TIKTOK | china | 01JAN2026 | 5 | 01JUL2026 | Mega |
| 10 | SophiaLee | TikTok | SouthKorea | 21NOV2020 | 2600000 | 8.7 | 230000 | Sophialee | TIKTOK | southkorea | 01JAN2026 | 6 | 01JUL2026 | Mega |
| 11 | RajVerma | India | 30AUG2016 | 600000 | 3.5 | 45000 | Rajverma | india | 01JAN2026 | 10 | 01JUL2026 | Growing | ||
| 12 | LucasMartin | France | 07JAN2018 | 750000 | 4.0 | 60000 | Lucasmartin | france | 01JAN2026 | 8 | 01JUL2026 | Growing | ||
| 13 | SaraKhan | YouTube | India | 20FEB2018 | 980000 | 6.2 | 120000 | Sarakhan | YOUTUBE | india | 01JAN2026 | 8 | 01JUL2026 | Growing |
| 14 | CarlosMendez | YouTube | Mexico | 12MAY2017 | 1100000 | 6.9 | 140000 | Carlosmendez | YOUTUBE | mexico | 01JAN2026 | 9 | 01JUL2026 | Growing |
| 15 | AnnaSmith | YouTube | USA | 02SEP2017 | 1750000 | 7.8 | 180000 | Annasmith | YOUTUBE | usa | 01JAN2026 | 9 | 01JUL2026 | Mega |
| 16 | PriyaNair | YouTube | India | 19FEB2019 | 1250000 | 6.5 | 150000 | Priyanair | YOUTUBE | india | 01JAN2026 | 7 | 01JUL2026 | Growing |
proc sort data=earnings_platform; by Platform_Upper; run;
run;
proc print data=earnings_platform;
run;
OUTPUT:
| Obs | Platform_Upper | Avg_Earnings |
|---|---|---|
| 1 | $105,000 | |
| 2 | TIKTOK | $226,667 |
| 3 | $52,500 | |
| 4 | YOUTUBE | $147,500 |
data influencers_merged;
merge influencers_final earnings_platform;
by Platform_Upper;
run;
run;
proc print data=influencers_merged;
run;
OUTPUT:
| Obs | Name | Platform | Country | Join_Date | Followers | Engagement_Rate | Earnings | Name_Proper | Platform_Upper | Country_Lower | Analysis_Date | Years_Active | Next_Review_Date | Popularity | Avg_Earnings |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | AmitSharma | India | 15JAN2019 | 1200000 | 4.5 | 85000 | Amitsharma | india | 01JAN2026 | 7 | 01JUL2026 | Growing | $105,000 | ||
| 2 | EmilyRose | UK | 05APR2019 | 1500000 | 5.4 | 130000 | Emilyrose | uk | 01JAN2026 | 7 | 01JUL2026 | Growing | $105,000 | ||
| 3 | FatimaAli | UAE | 25JUL2018 | 800000 | 4.1 | 70000 | Fatimaali | uae | 01JAN2026 | 8 | 01JUL2026 | Growing | $105,000 | ||
| 4 | NoahBrown | Canada | 14OCT2019 | 900000 | 4.8 | 95000 | Noahbrown | canada | 01JAN2026 | 7 | 01JUL2026 | Growing | $105,000 | ||
| 5 | MohammedZain | SaudiArabia | 11DEC2015 | 500000 | 3.9 | 40000 | Mohammedzain | saudiarabia | 01JAN2026 | 11 | 01JUL2026 | Growing | $105,000 | ||
| 6 | DavidWilson | Australia | 28MAR2020 | 2000000 | 5.9 | 210000 | Davidwilson | australia | 01JAN2026 | 6 | 01JUL2026 | Mega | $105,000 | ||
| 7 | 15JAN2023 | 450000 | 5.6 | 55000 | DemoUser | india | 01JAN2026 | 3 | 01JUL2026 | Emerging | $105,000 | ||||
| 8 | JohnDoe | TikTok | USA | 10MAR2020 | 2200000 | 8.1 | 200000 | Johndoe | TIKTOK | usa | 01JAN2026 | 6 | 01JUL2026 | Mega | $226,667 |
| 9 | LiWei | TikTok | China | 18JUN2021 | 3000000 | 9.3 | 250000 | Liwei | TIKTOK | china | 01JAN2026 | 5 | 01JUL2026 | Mega | $226,667 |
| 10 | SophiaLee | TikTok | SouthKorea | 21NOV2020 | 2600000 | 8.7 | 230000 | Sophialee | TIKTOK | southkorea | 01JAN2026 | 6 | 01JUL2026 | Mega | $226,667 |
| 11 | RajVerma | India | 30AUG2016 | 600000 | 3.5 | 45000 | Rajverma | india | 01JAN2026 | 10 | 01JUL2026 | Growing | $52,500 | ||
| 12 | LucasMartin | France | 07JAN2018 | 750000 | 4.0 | 60000 | Lucasmartin | france | 01JAN2026 | 8 | 01JUL2026 | Growing | $52,500 | ||
| 13 | SaraKhan | YouTube | India | 20FEB2018 | 980000 | 6.2 | 120000 | Sarakhan | YOUTUBE | india | 01JAN2026 | 8 | 01JUL2026 | Growing | $147,500 |
| 14 | CarlosMendez | YouTube | Mexico | 12MAY2017 | 1100000 | 6.9 | 140000 | Carlosmendez | YOUTUBE | mexico | 01JAN2026 | 9 | 01JUL2026 | Growing | $147,500 |
| 15 | AnnaSmith | YouTube | USA | 02SEP2017 | 1750000 | 7.8 | 180000 | Annasmith | YOUTUBE | usa | 01JAN2026 | 9 | 01JUL2026 | Mega | $147,500 |
| 16 | PriyaNair | YouTube | India | 19FEB2019 | 1250000 | 6.5 | 150000 | Priyanair | YOUTUBE | india | 01JAN2026 | 7 | 01JUL2026 | Growing | $147,500 |
12. TRANSPOSE – REPORTING FORMAT
proc transpose data=earnings_platform out=earnings_transposed;
id Platform_Upper;
var Avg_Earnings;
run;
proc print data=earnings_transposed;
run;
OUTPUT:
| Obs | _NAME_ | TIKTOK | YOUTUBE | ||
|---|---|---|---|---|---|
| 1 | Avg_Earnings | $105,000 | $226,667 | $52,500 | $147,500 |
Used heavily in TLF creation.
13. BUSINESS INSIGHTS DERIVED
·
TikTok influencers show highest engagement
·
YouTube has stable long-term earnings
·
Instagram influencers dominate brand partnerships
·
Mega influencers earn 2–3x more than Growing category
·
Engagement rate > followers for ROI(Return Of
Investment)
14. INTERVIEW QUESTIONS YOU CAN EXPECT
1.
Why INTCK instead of date subtraction?
2.
Difference between SET and MERGE?
3.
Why use macros in categorization?
4.
How does PROC SQL differ from DATA step?
5.
Why standardize character variables?
6.
When to use TRANSPOSE in reporting?
7.
How PROC SGPLOT differs from GPLOT?
15. WHAT YOU LEARN FROM THIS PROJECT
1. End-to-end SAS workflow
2.
Business + technical thinking
3.
Real-world marketing analytics
4.
Interview-ready SAS concepts
5.
Reusable macro design
6.
Clean reporting structure
CONCLUSION
This project mirrors real corporate analytics work used by:
·
Digital marketing firms
·
Social media analytics teams
·
Data science departments
·
Consulting organizations
About the Author:
SAS Learning Hub is a data analytics and SAS programming platform focused on clinical, financial, and real-world data analysis. The content is created by professionals with academic training in Pharmaceutics and hands-on experience in Base SAS, PROC SQL, Macros, SDTM, and ADaM, providing practical and industry-relevant SAS learning resources.
Disclaimer:
The datasets and analysis in this article are created for educational and demonstration purposes only. They do not represent Influencer Analytics data.
Our Mission:
This blog provides industry-focused SAS programming tutorials and analytics projects covering finance, healthcare, and technology.
This project is suitable for:
SAS Programmer Interviews
SAS Programmer Job Seekers
SAS Analysts
Comments
Post a Comment