228.GLOBAL ANALYSIS OF INFLUENCERS WORLDWIDE USING PROC FORMAT | PROC PRINT | PROC CONTENTS | PROC MEANS | PROC SUMMARY | PROC FREQ | PROC SORT | PROC SGPLOT | PROC SQL | PROC EXPORT | SAS MACROS IN SAS

GLOBAL ANALYSIS OF INFLUENCERS WORLDWIDE USING PROC FORMAT | PROC PRINT | PROC CONTENTS | PROC MEANS | PROC SUMMARY | PROC FREQ | PROC SORT | PROC SGPLOT | PROC SQL | PROC  EXPORT | SAS MACROS IN SAS

 /*Creating and exploring a “Worldwide Influencers” dataset*/

1.Setting global OPTIONS

OPTIONS

   NOCENTER           

   FULLSTIMER        

   YEARCUTOFF=1950 

   ERRORS=3      

   DKRICOND=ERROR;    /* raise error if duplicate key in PROC SQL update  */


2.Creating the dataset with DATA‑step functions

Step 1: Define custom format

proc format;

   value tierfmt

      1 = 'Nano (≤100K)'

      2 = 'Micro (100K–999K)'

      3 = 'Mid (1M–4.9M)'

      4 = 'Macro (5M–9.9M)'

      5 = 'Mega (10M+)';

run;


Step 2: Create influencer dataset

data work.influencers_worldwide;

   length InfluencerID 8 Name $40 Age 8 Region $20 Country $25 Platform $12

          Category $20 Followers_Millions 8 EngagementRate_Pct 8

          Avg_Views_K 8 Launch_Y Launch_M Launch_D 8

          Birth_Y Birth_M Birth_D 8 Launch_Date Birth_Date 8

          Collaboration_Tier 8;


   format Launch_Date Birth_Date date9.

          EngagementRate_Pct 5.2

          Followers_Millions 6.1

          Avg_Views_K 6.1

          Collaboration_Tier tierfmt.;


   input InfluencerID

         Name & :$40.

         Country & :$25.

         Platform & :$12.

         Category & :$20.

         Followers_Millions

         EngagementRate_Pct

         Avg_Views_K

         Launch_Y Launch_M Launch_D

         Birth_Y Birth_M Birth_D;


   /* Derived fields */

   Region = scan(Country, -1, ' ') || '-' || upcase(substr(Country, 1, 3));

   Launch_Date = mdy(Launch_M, Launch_D, Launch_Y);

   Birth_Date  = mdy(Birth_M, Birth_D, Birth_Y);

   Age = intck('YEAR', Birth_Date, today(), 'C');


   select;

      when (Followers_Millions < 0.1) Collaboration_Tier = 1;

      when (Followers_Millions <   1) Collaboration_Tier = 2;

      when (Followers_Millions <   5) Collaboration_Tier = 3;

      when (Followers_Millions <  10) Collaboration_Tier = 4;

      otherwise                                       Collaboration_Tier = 5;

   end;


   datalines;

1  Addison Rae            United States     TIKTOK      Beauty            88.9 4.7 1300 2019 7 14 2000 10 6

2  Khaby Lame             Italy             TIKTOK      Comedy            162  7.5 2000 2020 3 15 2000 3 9

3  Huda Kattan            UAE               INSTAGRAM   Beauty            52   3.2 900  2010 7 10 1983 10 2

4  Zach King              United States     YOUTUBE     Illusions         25   8.1 750  2008 1 15 1990 2 4

5  PewDiePie              Sweden            YOUTUBE     Gaming            111  3.1 3000 2010 4 29 1989 10 24

6  Charli D’Amelio        United States     TIKTOK      Dance             152  5.2 2500 2019 6 30 2004 5 1

7  Dude Perfect           United States     YOUTUBE     Sports            62   4.0 2800 2009 3 16 1988 5 16

8  NikkieTutorials        Netherlands       INSTAGRAM   Beauty            19.0 4.5 550  2012 6 24 1994 3 2

9  Lionel Messi           Argentina         INSTAGRAM   Sports            504  2.7 7200 2013 5 1  1987 6 24

10 Cristiano Ronaldo      Portugal          INSTAGRAM   Sports            630  2.8 8200 2012 2 14 1985 2 5

11 MrBeast                United States     YOUTUBE     Philanthropy      274  6.2 5000 2012 2 19 1998 5 7

12 Marie Kondo            Japan             INSTAGRAM   Lifestyle         8.7  4.1 200  2015 1 1  1984 10 9

13 Jay Shetty             United Kingdom    INSTAGRAM   Education         16.0 5.8 400  2016 3 5  1987 9 6

14 Yolanda Gampp          Canada            YOUTUBE     Baking            5.4  9.0 220  2015 5 12 1977 7 21

15 Kayla Itsines          Australia         INSTAGRAM   Fitness           16.6 3.9 380  2012 3 24 1991 5 21

16 TravelMad World        India             INSTAGRAM   Travel            2.3  6.5 120  2018 8 9  1992 8 10

17 Najmul Cooking         Bangladesh        FACEBOOK    Cooking           3.1 10.2 95   2019 11 2 1985 11 5

18 Nuseir Yassin          Israel            FACEBOOK    Travel            20   6.1 600  2016 4 9  1992 2 9

19 Macarena Achaga        Argentina         TIKTOK      Comedy            4.8  9.3 160  2021 1 1  1992 3 5

20 TechGirlNikki          Kenya             YOUTUBE     Tech              1.2  8.0 87   2020 9 18 1998 12 12

;

run;


Step 3: Print dataset to verify 

proc print data=work.influencers_worldwide; run;

Output:

Obs InfluencerID Name Age Region Country Platform Category Followers_Millions EngagementRate_Pct Avg_Views_K Launch_Y Launch_M Launch_D Birth_Y Birth_M Birth_D Launch_Date Birth_Date Collaboration_Tier
1 1 Addison Rae 14 States-UNI United States TIKTOK Beauty 88.9 4.70 1300.0 2019 7 14 2000 10 6 14JUL2019 06OCT2000 Mega (10M+)
2 2 Khaby Lame 15 Italy-ITA Italy TIKTOK Comedy 162.0 7.50 2000.0 2020 3 15 2000 3 9 15MAR2020 09MAR2000 Mega (10M+)
3 3 Huda Kattan 31 UAE-UAE UAE INSTAGRAM Beauty 52.0 3.20 900.0 2010 7 10 1983 10 2 10JUL2010 02OCT1983 Mega (10M+)
4 4 Zach King 25 States-UNI United States YOUTUBE Illusions 25.0 8.10 750.0 2008 1 15 1990 2 4 15JAN2008 04FEB1990 Mega (10M+)
5 5 PewDiePie 25 Sweden-SWE Sweden YOUTUBE Gaming 111.0 3.10 3000.0 2010 4 29 1989 10 24 29APR2010 24OCT1989 Mega (10M+)
6 6 Charli D’Amelio 11 States-UNI United States TIKTOK Dance 152.0 5.20 2500.0 2019 6 30 2004 5 1 30JUN2019 01MAY2004 Mega (10M+)
7 7 Dude Perfect 27 States-UNI United States YOUTUBE Sports 62.0 4.00 2800.0 2009 3 16 1988 5 16 16MAR2009 16MAY1988 Mega (10M+)
8 8 NikkieTutorials 21 Netherlands-NET Netherlands INSTAGRAM Beauty 19.0 4.50 550.0 2012 6 24 1994 3 2 24JUN2012 02MAR1994 Mega (10M+)
9 9 Lionel Messi 28 Argentina-ARG Argentina INSTAGRAM Sports 504.0 2.70 7200.0 2013 5 1 1987 6 24 01MAY2013 24JUN1987 Mega (10M+)
10 10 Cristiano Ronaldo 30 Portugal-POR Portugal INSTAGRAM Sports 630.0 2.80 8200.0 2012 2 14 1985 2 5 14FEB2012 05FEB1985 Mega (10M+)
11 11 MrBeast 17 States-UNI United States YOUTUBE Philanthropy 274.0 6.20 5000.0 2012 2 19 1998 5 7 19FEB2012 07MAY1998 Mega (10M+)
12 12 Marie Kondo 30 Japan-JAP Japan INSTAGRAM Lifestyle 8.7 4.10 200.0 2015 1 1 1984 10 9 01JAN2015 09OCT1984 Macro (5M–9.9M)
13 13 Jay Shetty 28 Kingdom-UNI United Kingdom INSTAGRAM Education 16.0 5.80 400.0 2016 3 5 1987 9 6 05MAR2016 06SEP1987 Mega (10M+)
14 14 Yolanda Gampp 38 Canada-CAN Canada YOUTUBE Baking 5.4 9.00 220.0 2015 5 12 1977 7 21 12MAY2015 21JUL1977 Macro (5M–9.9M)
15 15 Kayla Itsines 24 Australia-AUS Australia INSTAGRAM Fitness 16.6 3.90 380.0 2012 3 24 1991 5 21 24MAR2012 21MAY1991 Mega (10M+)
16 16 TravelMad World 23 India-IND India INSTAGRAM Travel 2.3 6.50 120.0 2018 8 9 1992 8 10 09AUG2018 10AUG1992 Mid (1M–4.9M)
17 17 Najmul Cooking 29 Bangladesh-BAN Bangladesh FACEBOOK Cooking 3.1 10.20 95.0 2019 11 2 1985 11 5 02NOV2019 05NOV1985 Mid (1M–4.9M)
18 18 Nuseir Yassin 23 Israel-ISR Israel FACEBOOK Travel 20.0 6.10 600.0 2016 4 9 1992 2 9 09APR2016 09FEB1992 Mega (10M+)
19 19 Macarena Achaga 23 Argentina-ARG Argentina TIKTOK Comedy 4.8 9.30 160.0 2021 1 1 1992 3 5 01JAN2021 05MAR1992 Mid (1M–4.9M)
20 20 TechGirlNikki 16 Kenya-KEN Kenya YOUTUBE Tech 1.2 8.00 87.0 2020 9 18 1998 12 12 18SEP2020 12DEC1998 Mid (1M–4.9M)


3.Peeking under the hood: PROC CONTENTS

PROC CONTENTS DATA=work.influencers_worldwide VARNUM;

   TITLE "Structural metadata for INFLUENCERS_WORLDWIDE";

RUN;

Output:

Structural metadata for INFLUENCERS_WORLDWIDE

The CONTENTS Procedure

Data Set Name WORK.INFLUENCERS_WORLDWIDE Observations 20
Member Type DATA Variables 19
Engine V9 Indexes 0
Created 14/09/2015 00:33:34 Observation Length 232
Last Modified 14/09/2015 00:33:34 Deleted Observations 0
Protection   Compressed NO
Data Set Type   Sorted NO
Label      
Data Representation WINDOWS_64    
Encoding wlatin1 Western (Windows)    


Engine/Host Dependent Information
Data Set Page Size 65536
Number of Data Set Pages 1
First Data Page 1
Max Obs per Page 282
Obs in First Data Page 20
Number of Data Set Repairs 0
ExtendObsCounter YES
Filename C:\Users\Lenovo\AppData\Local\Temp\SAS Temporary Files\_TD15916_DESKTOP-QFAA4KV_\influencers_worldwide.sas7bdat
Release Created 9.0401M2
Host Created X64_8HOME


Variables in Creation Order
# Variable Type Len Format
1 InfluencerID Num 8  
2 Name Char 40  
3 Age Num 8  
4 Region Char 20  
5 Country Char 25  
6 Platform Char 12  
7 Category Char 20  
8 Followers_Millions Num 8 6.1
9 EngagementRate_Pct Num 8 5.2
10 Avg_Views_K Num 8 6.1
11 Launch_Y Num 8  
12 Launch_M Num 8  
13 Launch_D Num 8  
14 Birth_Y Num 8  
15 Birth_M Num 8  
16 Birth_D Num 8  
17 Launch_Date Num 8 DATE9.
18 Birth_Date Num 8 DATE9.
19 Collaboration_Tier Num 8 TIERFMT.


4.Basic prints with PROC PRINT and WHERE‑logic

PROC PRINT DATA=work.influencers_worldwide

           NOOBS LABEL SPLIT='*';

   WHERE Platform='INSTAGRAM' AND EngagementRate_Pct > 4;

   VAR Name Country Followers_Millions EngagementRate_Pct Category;

   TITLE "High‑engagement Instagram creators (>4% ER)";

RUN;

Output:

High-engagement Instagram creators (>4% ER)

Name Country Followers_Millions EngagementRate_Pct Category
NikkieTutorials Netherlands 19.0 4.50 Beauty
Marie Kondo Japan 8.7 4.10 Lifestyle
Jay Shetty United Kingdom 16.0 5.80 Education
TravelMad World India 2.3 6.50 Travel


5.Descriptive statistics: PROC MEANS and PROC SUMMARY

PROC MEANS DATA=work.influencers_worldwide N MEAN STD MIN MAX MAXDEC=2;

   CLASS Platform;

   VAR Followers_Millions EngagementRate_Pct Avg_Views_K Age;

   TITLE "Platform‑wise central tendency and spread";

RUN;

Output:

Platform-wise central tendency and spread

The MEANS Procedure

Platform N Obs Variable N Mean Std Dev Minimum Maximum
FACEBOOK 2
Followers_Millions
EngagementRate_Pct
Avg_Views_K
Age
2
2
2
2
11.55
8.15
347.50
26.00
11.95
2.90
357.09
4.24
3.10
6.10
95.00
23.00
20.00
10.20
600.00
29.00
INSTAGRAM 8
Followers_Millions
EngagementRate_Pct
Avg_Views_K
Age
8
8
8
8
156.08
4.19
2243.75
26.88
256.27
1.38
3386.44
3.72
2.30
2.70
120.00
21.00
630.00
6.50
8200.00
31.00
TIKTOK 4
Followers_Millions
EngagementRate_Pct
Avg_Views_K
Age
4
4
4
4
101.93
6.68
1490.00
15.75
72.39
2.13
1014.10
5.12
4.80
4.70
160.00
11.00
162.00
9.30
2500.00
23.00
YOUTUBE 6
Followers_Millions
EngagementRate_Pct
Avg_Views_K
Age
6
6
6
6
79.77
6.40
1976.17
24.67
103.65
2.40
1950.75
7.97
1.20
3.10
87.00
16.00
274.00
9.00
5000.00
38.00

PROC SUMMARY DATA=work.influencers_worldwide NWAY;

   CLASS Category Collaboration_Tier;

   VAR Followers_Millions;

   OUTPUT OUT=work.mean_by_tier

          MEAN=Avg_Followers_M;

RUN;

Output:

Obs Category Collaboration_Tier _TYPE_ _FREQ_ Avg_Followers_M
1 Baking Macro (5M–9.9M) 3 1 5.4
2 Beauty Mega (10M+) 3 3 53.3
3 Comedy Mid (1M–4.9M) 3 1 4.8
4 Comedy Mega (10M+) 3 1 162.0
5 Cooking Mid (1M–4.9M) 3 1 3.1
6 Dance Mega (10M+) 3 1 152.0
7 Education Mega (10M+) 3 1 16.0
8 Fitness Mega (10M+) 3 1 16.6
9 Gaming Mega (10M+) 3 1 111.0
10 Illusions Mega (10M+) 3 1 25.0
11 Lifestyle Macro (5M–9.9M) 3 1 8.7
12 Philanthropy Mega (10M+) 3 1 274.0
13 Sports Mega (10M+) 3 3 398.7
14 Tech Mid (1M–4.9M) 3 1 1.2
15 Travel Mid (1M–4.9M) 3 1 2.3
16 Travel Mega (10M+) 3 1 20.0


6.Quick distributions with PROC FREQ

PROC FREQ DATA=work.influencers_worldwide ORDER=FREQ;

   TABLES Platform*Collaboration_Tier / NOCOL NOPERCENT NOROW;

   TITLE "Cross‑tab: Platform × Tier (counts only)";

RUN;

Output:

Cross-tab: Platform × Tier (counts only)

The FREQ Procedure

Frequency
Table of Platform by Collaboration_Tier
Platform Collaboration_Tier
Mega (10M+) Mid (1M–4.9M) Macro (5M–9.9M) Total
INSTAGRAM
6
1
1
8
YOUTUBE
4
1
1
6
TIKTOK
3
1
0
4
FACEBOOK
1
1
0
2
Total
14
4
2
20


7.Sorting for time‑series: PROC SORT

PROC SORT DATA=work.influencers_worldwide

          OUT=work.influencers_by_launch

          SORTSEQ=LINGUISTIC(Numeric_Collation=ON);  /* multi‑lingual safety */

   BY Launch_Date;

RUN;

proc print;run;

Output:

Obs InfluencerID Name Age Region Country Platform Category Followers_Millions EngagementRate_Pct Avg_Views_K Launch_Y Launch_M Launch_D Birth_Y Birth_M Birth_D Launch_Date Birth_Date Collaboration_Tier
1 4 Zach King 25 States-UNI United States YOUTUBE Illusions 25.0 8.10 750.0 2008 1 15 1990 2 4 15JAN2008 04FEB1990 Mega (10M+)
2 7 Dude Perfect 27 States-UNI United States YOUTUBE Sports 62.0 4.00 2800.0 2009 3 16 1988 5 16 16MAR2009 16MAY1988 Mega (10M+)
3 5 PewDiePie 25 Sweden-SWE Sweden YOUTUBE Gaming 111.0 3.10 3000.0 2010 4 29 1989 10 24 29APR2010 24OCT1989 Mega (10M+)
4 3 Huda Kattan 31 UAE-UAE UAE INSTAGRAM Beauty 52.0 3.20 900.0 2010 7 10 1983 10 2 10JUL2010 02OCT1983 Mega (10M+)
5 10 Cristiano Ronaldo 30 Portugal-POR Portugal INSTAGRAM Sports 630.0 2.80 8200.0 2012 2 14 1985 2 5 14FEB2012 05FEB1985 Mega (10M+)
6 11 MrBeast 17 States-UNI United States YOUTUBE Philanthropy 274.0 6.20 5000.0 2012 2 19 1998 5 7 19FEB2012 07MAY1998 Mega (10M+)
7 15 Kayla Itsines 24 Australia-AUS Australia INSTAGRAM Fitness 16.6 3.90 380.0 2012 3 24 1991 5 21 24MAR2012 21MAY1991 Mega (10M+)
8 8 NikkieTutorials 21 Netherlands-NET Netherlands INSTAGRAM Beauty 19.0 4.50 550.0 2012 6 24 1994 3 2 24JUN2012 02MAR1994 Mega (10M+)
9 9 Lionel Messi 28 Argentina-ARG Argentina INSTAGRAM Sports 504.0 2.70 7200.0 2013 5 1 1987 6 24 01MAY2013 24JUN1987 Mega (10M+)
10 12 Marie Kondo 30 Japan-JAP Japan INSTAGRAM Lifestyle 8.7 4.10 200.0 2015 1 1 1984 10 9 01JAN2015 09OCT1984 Macro (5M–9.9M)
11 14 Yolanda Gampp 38 Canada-CAN Canada YOUTUBE Baking 5.4 9.00 220.0 2015 5 12 1977 7 21 12MAY2015 21JUL1977 Macro (5M–9.9M)
12 13 Jay Shetty 28 Kingdom-UNI United Kingdom INSTAGRAM Education 16.0 5.80 400.0 2016 3 5 1987 9 6 05MAR2016 06SEP1987 Mega (10M+)
13 18 Nuseir Yassin 23 Israel-ISR Israel FACEBOOK Travel 20.0 6.10 600.0 2016 4 9 1992 2 9 09APR2016 09FEB1992 Mega (10M+)
14 16 TravelMad World 23 India-IND India INSTAGRAM Travel 2.3 6.50 120.0 2018 8 9 1992 8 10 09AUG2018 10AUG1992 Mid (1M–4.9M)
15 6 Charli D’Amelio 11 States-UNI United States TIKTOK Dance 152.0 5.20 2500.0 2019 6 30 2004 5 1 30JUN2019 01MAY2004 Mega (10M+)
16 1 Addison Rae 14 States-UNI United States TIKTOK Beauty 88.9 4.70 1300.0 2019 7 14 2000 10 6 14JUL2019 06OCT2000 Mega (10M+)
17 17 Najmul Cooking 29 Bangladesh-BAN Bangladesh FACEBOOK Cooking 3.1 10.20 95.0 2019 11 2 1985 11 5 02NOV2019 05NOV1985 Mid (1M–4.9M)
18 2 Khaby Lame 15 Italy-ITA Italy TIKTOK Comedy 162.0 7.50 2000.0 2020 3 15 2000 3 9 15MAR2020 09MAR2000 Mega (10M+)
19 20 TechGirlNikki 16 Kenya-KEN Kenya YOUTUBE Tech 1.2 8.00 87.0 2020 9 18 1998 12 12 18SEP2020 12DEC1998 Mid (1M–4.9M)
20 19 Macarena Achaga 23 Argentina-ARG Argentina TIKTOK Comedy 4.8 9.30 160.0 2021 1 1 1992 3 5 01JAN2021 05MAR1992 Mid (1M–4.9M)


8.Visual pulse: PROC SGPLOT

PROC SGPLOT DATA=work.influencers_worldwide;

   SCATTER X=Followers_Millions Y=EngagementRate_Pct / 

           GROUP=Platform DATALABEL=Name;

   YAXIS LABEL='Engagement Rate (%)';

   XAXIS LABEL='Followers (Millions)';

   TITLE "Followers vs. Engagement – which megastars defy the reach‑rate paradox?";

RUN;

Log:

NOTE: PROCEDURE SGPLOT used (Total process time):

      real time           3.14 seconds

      user cpu time       0.21 seconds

      system cpu time     0.18 seconds

      memory              10975.40k

      OS Memory           28792.00k

      Timestamp           14/09/2015 12:38:58 AM

      Step Count                        34  Switch Count  0


NOTE: Listing image output written to SGPlot1.png.

NOTE: There were 20 observations read from the data set WORK.INFLUENCERS_WORLDWIDE.


9.Relational power: PROC SQL for continent averages

PROC SQL;

   SELECT CASE 

            WHEN Country IN ('United States','Canada')           THEN 'North America'

            WHEN Country IN ('Argentina','Brazil')               THEN 'South America'

            WHEN Country IN ('Italy','Portugal','Sweden','UAE',

                             'United Kingdom')                   THEN 'Europe'

            WHEN Country IN ('Kenya')                            THEN 'Africa'

            WHEN Country IN ('Japan','India','Bangladesh','Israel') THEN 'Asia'

            ELSE 'Other'

          END          AS Continent,

          COUNT(*)     AS Num_Influencers,

          ROUND(AVG(Followers_Millions),0.1) AS Avg_Millions_Followers FORMAT=6.1,

          ROUND(AVG(EngagementRate_Pct),0.1) AS Avg_Engage_Pct FORMAT=5.1

   FROM   work.influencers_worldwide

   GROUP  BY Continent

   ORDER  BY Avg_Millions_Followers DESC;

QUIT;

Output:

Followers vs. Engagement – which megastars defy the reach-rate paradox?

Continent Num_Influencers Avg_Millions_Followers Avg_Engage_Pct
South America 2 254.4 6.0
Europe 5 194.2 4.5
North America 6 101.2 6.2
Other 2 17.8 4.2
Asia 4 8.5 6.7
Africa 1 1.2 8.0


10.Reusable automation: a macro for regional one‑pagers

%MACRO region_report(rgn);

   %PUT NOTE: ===== Generating report for &rgn =====;


   TITLE1 "Influencers in &rgn — Descriptive Snapshot";

   PROC PRINT DATA=work.influencers_worldwide NOOBS;

      WHERE UPCASE(Region) = "%UPCASE(&rgn)";

      VAR Name Platform Category Followers_Millions EngagementRate_Pct;

   RUN;


   PROC MEANS DATA=work.influencers_worldwide MAXDEC=2;

      WHERE UPCASE(Region) = "%UPCASE(&rgn)";

      VAR Followers_Millions EngagementRate_Pct Avg_Views_K;

      TITLE2 "Key statistics for &rgn";

   RUN;


   PROC FREQ DATA=work.influencers_worldwide;

      WHERE UPCASE(Region) = "%UPCASE(&rgn)";

      TABLES Category / NOPERCENT NOCOL;

      TITLE2 "Category spread for &rgn";

   RUN;

%MEND;


%region_report(States-UNI);

Output:

Influencers in States-UNI — Descriptive Snapshot

Name Platform Category Followers_Millions EngagementRate_Pct
Addison Rae TIKTOK Beauty 88.9 4.70
Zach King YOUTUBE Illusions 25.0 8.10
Charli D’Amelio TIKTOK Dance 152.0 5.20
Dude Perfect YOUTUBE Sports 62.0 4.00
MrBeast YOUTUBE Philanthropy 274.0 6.20

Influencers in States-UNI — Descriptive Snapshot
Key statistics for States-UNI

The MEANS Procedure

Variable N Mean Std Dev Minimum Maximum
Followers_Millions
EngagementRate_Pct
Avg_Views_K
5
5
5
120.38
5.64
2470.00
97.59
1.59
1646.06
25.00
4.00
750.00
274.00
8.10
5000.00

Influencers in States-UNI — Descriptive Snapshot
Category spread for States-UNI

The FREQ Procedure

Category Frequency Cumulative
Frequency
Beauty 1 1
Dance 1 2
Illusions 1 3
Philanthropy 1 4
Sports 1 5

%region_report(Argentina-ARG);

Output:

Influencers in Argentina-ARG — Descriptive Snapshot

Name Platform Category Followers_Millions EngagementRate_Pct
Lionel Messi INSTAGRAM Sports 504.0 2.70
Macarena Achaga TIKTOK Comedy 4.8 9.30

Influencers in Argentina-ARG — Descriptive Snapshot
Key statistics for Argentina-ARG

The MEANS Procedure

Variable N Mean Std Dev Minimum Maximum
Followers_Millions
EngagementRate_Pct
Avg_Views_K
2
2
2
254.40
6.00
3680.00
352.99
4.67
4978.03
4.80
2.70
160.00
504.00
9.30
7200.00

Influencers in Argentina-ARG — Descriptive Snapshot
Category spread for Argentina-ARG

The FREQ Procedure

Category Frequency Cumulative
Frequency
Comedy 1 1
Sports 1 2

11.Exporting

PROC EXPORT DATA=work.mean_by_tier

            OUTFILE="influencer_mean_by_tier.csv"

            DBMS=CSV REPLACE;

RUN;

Log:
NOTE: The file 'influencer_mean_by_tier.csv' is:
      Filename=C:\sas folder\SASFoundation\9.4\influencer_mean_by_tier.csv,
      RECFM=V,LRECL=32767,File Size (bytes)=0,
      Last Modified=02 July 2025 17:13:54,
      Create Time=02 July 2025 17:13:54

NOTE: 17 records were written to the file 'influencer_mean_by_tier.csv'.
      The minimum record length was 26.
      The maximum record length was 57.
NOTE: There were 16 observations read from the data set WORK.MEAN_BY_TIER.
NOTE: DATA statement used (Total process time):
      real time           0.13 seconds
      user cpu time       0.00 seconds
      system cpu time     0.06 seconds
      memory              8720.25k
      OS Memory           35316.00k
      Timestamp           14/09/2015 12:45:56 AM
      Step Count                        45  Switch Count  0


16 records created in influencer_mean_by_tier.csv from WORK.MEAN_BY_TIER.


NOTE: "influencer_mean_by_tier.csv" file was successfully created.
NOTE: PROCEDURE EXPORT used (Total process time):
      real time           2.50 seconds
      user cpu time       0.09 seconds
      system cpu time     0.15 seconds
      memory              8720.25k
      OS Memory           35316.00k
      Timestamp           14/09/2015 12:45:56 AM
      Step Count                        45  Switch Count  7




To Visit My Previous Book Store Dataset:Click Here
To Visit My Previous Festival Dataset:Click Here
To Visit My Previous SQL Joins:Click Here
To Visit My Previous Sas Interview Questions-1:Click Here




--->PRACTICE AND COMMENT YOUR OUTPUT: 
--->PLEASE FOLLOW OUR BLOG FOR MORE UPDATES.

PLEASE FOLLOW OUR TELEGRAM CHANNEL CLICK HERE
PLEASE FOLLOW OUR FACEBOOK PAGE  CLICK HERE
PLEASE FOLLOW OUR INSTAGRAM PAGE CLICK HERE




Comments