211.PROJECT TITLE: ANALYZING DIFFERENT TYPES OF SERIES IN 2025 INCLUDING GENRE REGION PLATFORM LANGUAGE RATING USING PROC PRINT | PROC FREQ | PROC SQL | PROC MEANS | PROC MACRO IN SAS

PROJECT TITLE: ANALYZING DIFFERENT TYPES OF SERIES IN 2025 INCLUDING GENRE REGION PLATFORM LANGUAGE RATING USING PROC PRINT | PROC FREQ | PROC SQL | PROC MEANS | PROC MACRO IN SAS

 /*Creating a dataset for different types of series*/

STEP 1: CREATING THE SERIES DATASET

data series;

    infile datalines dlm= " " dsd truncover;

    length Series_ID 8 Title $40 Genre $20 Region $20 Platform $20 Language $15 

           Type $15 Release_Date 8 Episodes 8 Avg_Rating 4.1;

    format Release_Date date9.;

    input 

        Series_ID 

        Title :$40. 

        Genre :$20. 

        Region :$20. 

        Platform :$20. 

        Language :$15. 

        Type :$15. 

        Release_Date :date9. 

        Episodes 

        Avg_Rating;

    datalines;

1 "Echoes of Tomorrow" Sci-Fi USA Netflix English Web 01JAN2025 8 8.5

2 "Mystic Realms" Fantasy UK Prime English Web 15JAN2025 10 8.2

3 "Legal Shadows" Drama India Hotstar Hindi Web 10FEB2025 12 7.9

4 "Soul & Steel" Action Japan Netflix Japanese Anime 01MAR2025 24 9.0

5 "Quantum Heist" Thriller USA AppleTV English Web 20MAR2025 6 8.1

6 "Village Ties" Drama India Zee5 Telugu Web 01APR2025 10 7.8

7 "Deep Dive" Documentary Canada Hulu English Docu 10APR2025 5 8.6

8 "Winds of Kyoto" Romance Japan Crunchyroll Japanese Anime 25APR2025 16 8.7

9 "Hack the Truth" Tech South_Korea Netflix Korean Web 01MAY2025 8 9.1

10 "Criminal Roots" Crime Germany Netflix German Web 10MAY2025 6 8.3

11 "Cosmic Nursery" Sci-Fi USA HBO English Web 25MAY2025 7 8.0

12 "Truth Files" Documentary USA Prime English Docu 05JUN2025 4 7.9

13 "Parallel Wars" Action France Netflix French Web 15JUN2025 10 8.4

14 "Sacred Signs" Mythology India Sony Hindi Web 20JUN2025 12 7.7

15 "Code Hunt" Tech India MXPlayer Hindi Web 01JUL2025 8 8.8

16 "Borderless" Thriller Spain HBO Spanish Web 15JUL2025 9 8.2

17 "Desert Bloom" Drama Egypt Netflix Arabic Web 20JUL2025 7 7.5

;

run;

proc print;

run;

Output:

Obs Series_ID Title Genre Region Platform Language Type Release_Date Episodes Avg_Rating
1 1 Echoes of Tomorrow Sci-Fi USA Netflix English Web 01JAN2025 8 8.50000
2 2 Mystic Realms Fantasy UK Prime English Web 15JAN2025 10 8.20000
3 3 Legal Shadows Drama India Hotstar Hindi Web 10FEB2025 12 7.90000
4 4 Soul & Steel Action Japan Netflix Japanese Anime 01MAR2025 24 9.00000
5 5 Quantum Heist Thriller USA AppleTV English Web 20MAR2025 6 8.10000
6 6 Village Ties Drama India Zee5 Telugu Web 01APR2025 10 7.80000
7 7 Deep Dive Documentary Canada Hulu English Docu 10APR2025 5 8.60000
8 8 Winds of Kyoto Romance Japan Crunchyroll Japanese Anime 25APR2025 16 8.70000
9 9 Hack the Truth Tech South_Korea Netflix Korean Web 01MAY2025 8 9.10000
10 10 Criminal Roots Crime Germany Netflix German Web 10MAY2025 6 8.30000
11 11 Cosmic Nursery Sci-Fi USA HBO English Web 25MAY2025 7 8.00000
12 12 Truth Files Documentary USA Prime English Docu 05JUN2025 4 7.90000
13 13 Parallel Wars Action France Netflix French Web 15JUN2025 10 8.39999
14 14 Sacred Signs Mythology India Sony Hindi Web 20JUN2025 12 7.70000
15 15 Code Hunt Tech India MXPlayer Hindi Web 01JUL2025 8 8.80000
16 16 Borderless Thriller Spain HBO Spanish Web 15JUL2025 9 8.20000
17 17 Desert Bloom Drama Egypt Netflix Arabic Web 20JUL2025 7 7.50000


STEP 2: PRINTING RAW DATASET USING PROC PRINT

proc print data=series noobs label;

    title "Complete Series 2025 Dataset";

    label 

        Title = "Series Title"

        Genre = "Genre"

        Region = "Origin Country"

        Platform = "Streaming Platform"

        Language = "Spoken Language"

        Type = "Series Type"

        Release_Date = "Release Date"

        Episodes = "No. of Episodes"

        Avg_Rating = "Average Rating";

run;

Output:

Complete Series 2025 Dataset

Series_ID Series Title Genre Origin Country Streaming Platform Spoken Language Series Type Release Date No. of
Episodes
Average Rating
1 Echoes of Tomorrow Sci-Fi USA Netflix English Web 01JAN2025 8 8.50000
2 Mystic Realms Fantasy UK Prime English Web 15JAN2025 10 8.20000
3 Legal Shadows Drama India Hotstar Hindi Web 10FEB2025 12 7.90000
4 Soul & Steel Action Japan Netflix Japanese Anime 01MAR2025 24 9.00000
5 Quantum Heist Thriller USA AppleTV English Web 20MAR2025 6 8.10000
6 Village Ties Drama India Zee5 Telugu Web 01APR2025 10 7.80000
7 Deep Dive Documentary Canada Hulu English Docu 10APR2025 5 8.60000
8 Winds of Kyoto Romance Japan Crunchyroll Japanese Anime 25APR2025 16 8.70000
9 Hack the Truth Tech South_Korea Netflix Korean Web 01MAY2025 8 9.10000
10 Criminal Roots Crime Germany Netflix German Web 10MAY2025 6 8.30000
11 Cosmic Nursery Sci-Fi USA HBO English Web 25MAY2025 7 8.00000
12 Truth Files Documentary USA Prime English Docu 05JUN2025 4 7.90000
13 Parallel Wars Action France Netflix French Web 15JUN2025 10 8.39999
14 Sacred Signs Mythology India Sony Hindi Web 20JUN2025 12 7.70000
15 Code Hunt Tech India MXPlayer Hindi Web 01JUL2025 8 8.80000
16 Borderless Thriller Spain HBO Spanish Web 15JUL2025 9 8.20000
17 Desert Bloom Drama Egypt Netflix Arabic Web 20JUL2025 7 7.50000

STEP 3: BASIC STATISTICS USING PROC MEANS

proc means data=series n mean min max stddev maxdec=2;

    var Episodes Avg_Rating;

    title "Statistical Summary of Episodes and Ratings";

run;

Output:

Statistical Summary of Episodes and Ratings

The MEANS Procedure

Variable N Mean Minimum Maximum Std Dev
Episodes
Avg_Rating
17
17
9.53
8.28
4.00
7.50
24.00
9.10
4.74
0.46

STEP 4: FREQUENCY ANALYSIS USING PROC FREQ

proc freq data=series;

    tables Genre Region Platform Language Type;

    title "Frequency Distribution of Series Attributes";

run;

Output:

Frequency Distribution of Series Attributes

The FREQ Procedure

Genre Frequency Percent Cumulative
Frequency
Cumulative
Percent
Action 2 11.76 2 11.76
Crime 1 5.88 3 17.65
Documentary 2 11.76 5 29.41
Drama 3 17.65 8 47.06
Fantasy 1 5.88 9 52.94
Mythology 1 5.88 10 58.82
Romance 1 5.88 11 64.71
Sci-Fi 2 11.76 13 76.47
Tech 2 11.76 15 88.24
Thriller 2 11.76 17 100.00

Region Frequency Percent Cumulative
Frequency
Cumulative
Percent
Canada 1 5.88 1 5.88
Egypt 1 5.88 2 11.76
France 1 5.88 3 17.65
Germany 1 5.88 4 23.53
India 4 23.53 8 47.06
Japan 2 11.76 10 58.82
South_Korea 1 5.88 11 64.71
Spain 1 5.88 12 70.59
UK 1 5.88 13 76.47
USA 4 23.53 17 100.00

Platform Frequency Percent Cumulative
Frequency
Cumulative
Percent
AppleTV 1 5.88 1 5.88
Crunchyroll 1 5.88 2 11.76
HBO 2 11.76 4 23.53
Hotstar 1 5.88 5 29.41
Hulu 1 5.88 6 35.29
MXPlayer 1 5.88 7 41.18
Netflix 6 35.29 13 76.47
Prime 2 11.76 15 88.24
Sony 1 5.88 16 94.12
Zee5 1 5.88 17 100.00

Language Frequency Percent Cumulative
Frequency
Cumulative
Percent
Arabic 1 5.88 1 5.88
English 6 35.29 7 41.18
French 1 5.88 8 47.06
German 1 5.88 9 52.94
Hindi 3 17.65 12 70.59
Japanese 2 11.76 14 82.35
Korean 1 5.88 15 88.24
Spanish 1 5.88 16 94.12
Telugu 1 5.88 17 100.00

Type Frequency Percent Cumulative
Frequency
Cumulative
Percent
Anime 2 11.76 2 11.76
Docu 2 11.76 4 23.53
Web 13 76.47 17 100.00

STEP 5: SQL ANALYSIS USING PROC SQL

a) Top Rated Series (Rating > 8.5)

proc sql;

    select Title, Genre, Region, Avg_Rating

    from series

    where Avg_Rating > 8.5

    order by Avg_Rating desc;

quit;

Output:

Title Genre Region Avg_Rating
Hack the Truth Tech South_Korea 9.099998
Soul & Steel Action Japan 9
Code Hunt Tech India 8.799995
Winds of Kyoto Romance Japan 8.699997
Deep Dive Documentary Canada 8.599998

b) Average Ratings by Genre

proc sql;

    select Genre, count(*) as Total_Series, avg(Avg_Rating) as Avg_Rating format=4.2

    from series

    group by Genre

    order by Avg_Rating desc;

quit;

Output:

Genre Total_Series Avg_Rating
Tech 2 8.95
Action 2 8.70
Romance 1 8.70
Crime 1 8.30
Sci-Fi 2 8.25
Documentary 2 8.25
Fantasy 1 8.20
Thriller 2 8.15
Drama 3 7.73
Mythology 1 7.70

c) Total Series by Region

proc sql;

    select Region, count(*) as Num_Series

    from series

    group by Region

    order by Num_Series desc;

quit;

Output:

Region Num_Series
USA 4
India 4
Japan 2
South_Korea 1
France 1
UK 1
Canada 1
Egypt 1
Germany 1
Spain 1

STEP 6: MACRO AUTOMATION

a) Macro to Get Series Info by Language

%macro get_by_language(lang);

    proc sql;

        title "Series in &lang Language";

        select Title, Genre, Platform, Avg_Rating

        from series

        where Language = "&lang";

    quit;

%mend;


%get_by_language(English);

Output:

Series in English Language

Title Genre Platform Avg_Rating
Echoes of Tomorrow Sci-Fi Netflix 8.5
Mystic Realms Fantasy Prime 8.199997
Quantum Heist Thriller AppleTV 8.099998
Deep Dive Documentary Hulu 8.599998
Cosmic Nursery Sci-Fi HBO 8
Truth Files Documentary Prime 7.899998

%get_by_language(Hindi);

Output:

Series in Hindi Language

Title Genre Platform Avg_Rating
Legal Shadows Drama Hotstar 7.899998
Sacred Signs Mythology Sony 7.699997
Code Hunt Tech MXPlayer 8.799995

b) Macro to Filter by Genre and Rating

%macro genre_rating_filter(genre, rating);

    proc sql;

        title "Series in &genre Genre with Rating > &rating";

        select Title, Region, Platform, Avg_Rating

        from series

        where Genre = "&genre" and Avg_Rating > &rating;

    quit;

%mend;


%genre_rating_filter(Drama, 8.0);

Output:

NOTE: No rows were selected.
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.06 seconds
      cpu time            0.01 seconds

%genre_rating_filter(Sci-Fi, 8.2);

Output:

Series in Sci-Fi Genre with Rating > 8.2

Title Region Platform Avg_Rating
Echoes of Tomorrow USA Netflix 8.5



To Visit My Previous Sas Project 11-20 Questions:Click Here
To Visit My Previous %Let %Put %Eval In Sas:Click Here
To Visit My Previous Creating Assessing Cleaning Manipulation In Sas:Click Here
To Visit My Previous Proc Contents In Sas:Click Here





--->PLEASE FOLLOW OUR BLOG FOR MORE INFORMATION.
--->PLEASE DO COMMENTS AND SHARE OUR BLOG.

PLEASE FOLLOW OUR TELEGRAM CHANNEL CLICK HERE

PLEASE FOLLOW OUR FACEBOOK PAGE  CLICK HERE

PLEASE FOLLOW OUR INSTAGRAM PAGE CLICK HERE



Comments