BookmarkSubscribeRSS Feed
tc
Lapis Lazuli | Level 10 tc
Lapis Lazuli | Level 10

Oscars2025.png

 

Oscars are Sunday, so here's a SAS ODS Graphics annotated step+text+needle chart of the runtimes of the Best Picture nominees. The Wrap did the math and came up with a total of about 26-and-a-half hours, so there's still time to binge watch 'em all before the show!

  

* Fun With SAS ODS Graphics: 2025 Academy Awards Best Picture Nominee Runtimes (Runtimes from IMDB)
  Inspired by "Here’s How Long It Takes to Watch All the 2025 Best Picture Nominees"
  https://www.thewrap.com/how-long-2025-oscars-best-picture-nominees-runtimes/;
                                     * Grab 2025 Best Picture Oscar nominee data from Excel (Movie, Length, Image Name);
proc import file='/home/ted.conway/Oscars2025/Oscars2025.xlsx' dbms=xlsx out=movies replace; 

data movies2;                        * Convert hours/minutes to minutes;
set movies;
minutes=sum(scan(compress(length,'hm'),1,' hm')*60,scan(compress(length,'hm'),2,' hm')); 

proc sort data=movies2; by minutes; * Display shortest ==> longest films;

data images;                         * Annotate chart with Best Picture nominee images using SAS-provided macros;                                                     
%SGANNO;                             * Resize all images to same height, but display at a height that matches their runtime (minutes); 
%SGIMAGE (image="/home/ted.conway/Oscars2025/ACompleteUnknown.jpg",border="true",linecolor="white",drawspace="datavalue",imagescale="fitheight",xc1="A Complete Unknown",y1=141,height=120,heightunit="DATA",anchor="TOP");
%SGIMAGE (image="/home/ted.conway/Oscars2025/Anora.jpg",           border="true",linecolor="white",drawspace="datavalue",imagescale="fitheight",xc1="Anora",             y1=139,height=120,heightunit="DATA",anchor="TOP");
%SGIMAGE (image="/home/ted.conway/Oscars2025/Conclave.jpg",        border="true",linecolor="white",drawspace="datavalue",imagescale="fitheight",xc1="Conclave",          y1=120,height=120,heightunit="DATA",anchor="TOP");
%SGIMAGE (image="/home/ted.conway/Oscars2025/DunePartTwo.jpg",     border="true",linecolor="white",drawspace="datavalue",imagescale="fitheight",xc1="Dune: Part Two",    y1=166,height=120,heightunit="DATA",anchor="TOP");
%SGIMAGE (image="/home/ted.conway/Oscars2025/EmiliaPerez.jpg",     border="true",linecolor="white",drawspace="datavalue",imagescale="fitheight",xc1="Emilia Pérez",      y1=132,height=120,heightunit="DATA",anchor="TOP");
%SGIMAGE (image="/home/ted.conway/Oscars2025/ImStillHere.jpg",     border="true",linecolor="white",drawspace="datavalue",imagescale="fitheight",xc1="I'm Still Here",    y1=137,height=120,heightunit="DATA",anchor="TOP");
%SGIMAGE (image="/home/ted.conway/Oscars2025/NickelBoys.jpg",      border="true",linecolor="white",drawspace="datavalue",imagescale="fitheight",xc1="Nickel Boys",       y1=140,height=120,heightunit="DATA",anchor="TOP");
%SGIMAGE (image="/home/ted.conway/Oscars2025/TheBrutalist.jpg",    border="true",linecolor="white",drawspace="datavalue",imagescale="fitheight",xc1="The Brutalist",     y1=214,height=120,heightunit="DATA",anchor="TOP");
%SGIMAGE (image="/home/ted.conway/Oscars2025/TheSubstance.jpg",    border="true",linecolor="white",drawspace="datavalue",imagescale="fitheight",xc1="The Substance",     y1=141,height=120,heightunit="DATA",anchor="TOP");
%SGIMAGE (image="/home/ted.conway/Oscars2025/Wicked.jpg",          border="true",linecolor="white",drawspace="datavalue",imagescale="fitheight",xc1="Wicked",            y1=160,height=120,heightunit="DATA",anchor="TOP");
                                     * Generate chart of films/lengths (Step+Text+Needle plots);
ods listing image_dpi=300 gpath='/home/ted.conway/Oscars2025'; * Increase resolution to 300 DPI;
ods graphics / reset height=6in width=24in imagefmt=png noborder imagename='Oscars2025';
proc sgplot data=movies2 sganno=images nowall noborder noautolegend ;
styleattrs backcolor=black;
inset "2025 Academy Awards Best Picture Nominee Runtimes" / textattrs=(color=white size=18pt weight=bold) position=topleft;
needle x=movie y=minutes / lineattrs=(thickness=4pt color=white); * Show a drop line from image to baseline ("lollipop" chart);
step x=movie y=minutes / justify=center lineattrs=(color=white thickness=2pt); * Step chart of time for each movie;
text x=movie y=minutes text=length / strip contributeoffsets=none pad=3 textattrs=(size=12pt color=white weight=bold) position=top; * Display time (hours and minutes);
xaxis display=(nolabel noticks noline) valueattrs=(color=white weight=bold size=12pt) offsetmin=.06 offsetmax=.06; * X-axis displays movie names in ascending runtime order;
yaxis display=(nolabel noticks noline) valueattrs=(color=white weight=bold size=12pt) values=(0  60 120 180 225) valuesdisplay=('0' '60' '120' '180' ' '); * Y-axis displays runtimes (minutes);
refline 0 60 120 180 / axis=y lineattrs=(color=grey) label=""; * Display reference lines for each hour; 
run;

 

80% Zoom

Oscars2025Snippet.png

 

 

2 REPLIES 2
tc
Lapis Lazuli | Level 10 tc
Lapis Lazuli | Level 10

No time to watch all the nominees? No problem! Clickable images in GitHub-hosted version of SAS ODS Graphics chart will take you to the 2025 Academy Awards Best Picture nominee trailers!

 

https://tedconway.github.io/Misc/oscars2025.html

Oscars2025Trailers.png

 

HTML Version of Chart (clickable images link to YouTube trailers)

* Fun With SAS ODS Graphics: 2025 Academy Awards Best Picture Nominee Runtimes (Runtimes from IMDB)
  Inspired by "Here’s How Long It Takes to Watch All the 2025 Best Picture Nominees"
  https://www.thewrap.com/how-long-2025-oscars-best-picture-nominees-runtimes/;
                                     * Grab 2025 Best Picture Oscar nominee data from Excel (Movie, Length, Image Name);
proc import file='/home/ted.conway/Oscars2025/Oscars2025.xlsx' dbms=xlsx out=movies replace; 

data movies2;                        * Convert hours/minutes to minutes;
set movies;
minutes=sum(scan(compress(length,'hm'),1,' hm')*60,scan(compress(length,'hm'),2,' hm')); 

proc sort data=movies2; by minutes; * Display shortest ==> longest films;

data images;                         * Annotate chart with Best Picture nominee images (with clickable URLs to movie trailers) using SAS-provided macros;                                                     
%SGANNO;                             * Resize all images to same height, but display at a height that matches their runtime (minutes); 
%SGIMAGE (image="/home/ted.conway/Oscars2025/ACompleteUnknown.jpg",border="true",linecolor="white",drawspace="datavalue",imagescale="fitheight",xc1="A Complete Unknown",y1=141,height=120,heightunit="DATA",anchor="TOP",URL='https://www.youtube.com/watch?v=FdV-Cs5o8mc');
%SGIMAGE (image="/home/ted.conway/Oscars2025/Anora.jpg",           border="true",linecolor="white",drawspace="datavalue",imagescale="fitheight",xc1="Anora",             y1=139,height=120,heightunit="DATA",anchor="TOP",URL='https://www.youtube.com/watch?v=8m6UrWMl18M');
%SGIMAGE (image="/home/ted.conway/Oscars2025/Conclave.jpg",        border="true",linecolor="white",drawspace="datavalue",imagescale="fitheight",xc1="Conclave",          y1=120,height=120,heightunit="DATA",anchor="TOP",URL='https://www.youtube.com/watch?v=JX9jasdi3ic');
%SGIMAGE (image="/home/ted.conway/Oscars2025/DunePartTwo.jpg",     border="true",linecolor="white",drawspace="datavalue",imagescale="fitheight",xc1="Dune: Part Two",    y1=166,height=120,heightunit="DATA",anchor="TOP",URL='https://www.youtube.com/watch?v=Way9Dexny3w');
%SGIMAGE (image="/home/ted.conway/Oscars2025/EmiliaPerez.jpg",     border="true",linecolor="white",drawspace="datavalue",imagescale="fitheight",xc1="Emilia Pérez",      y1=132,height=120,heightunit="DATA",anchor="TOP",URL='https://www.youtube.com/watch?v=4h7j_EcZ5fU');
%SGIMAGE (image="/home/ted.conway/Oscars2025/ImStillHere.jpg",     border="true",linecolor="white",drawspace="datavalue",imagescale="fitheight",xc1="I'm Still Here",    y1=137,height=120,heightunit="DATA",anchor="TOP",URL='https://www.youtube.com/watch?v=gDunV808Yf4');
%SGIMAGE (image="/home/ted.conway/Oscars2025/NickelBoys.jpg",      border="true",linecolor="white",drawspace="datavalue",imagescale="fitheight",xc1="Nickel Boys",       y1=140,height=120,heightunit="DATA",anchor="TOP",URL='https://www.youtube.com/watch?v=8HZKgYknVN0');
%SGIMAGE (image="/home/ted.conway/Oscars2025/TheBrutalist.jpg",    border="true",linecolor="white",drawspace="datavalue",imagescale="fitheight",xc1="The Brutalist",     y1=214,height=120,heightunit="DATA",anchor="TOP",URL='https://www.youtube.com/watch?v=GdRXPAHIEW4');
%SGIMAGE (image="/home/ted.conway/Oscars2025/TheSubstance.jpg",    border="true",linecolor="white",drawspace="datavalue",imagescale="fitheight",xc1="The Substance",     y1=141,height=120,heightunit="DATA",anchor="TOP",URL='https://www.youtube.com/watch?v=LNlrGhBpYjc');
%SGIMAGE (image="/home/ted.conway/Oscars2025/Wicked.jpg",          border="true",linecolor="white",drawspace="datavalue",imagescale="fitheight",xc1="Wicked",            y1=160,height=120,heightunit="DATA",anchor="TOP",URL='https://www.youtube.com/watch?v=6COmYeLsz4c');
                                     * Generate chart of films/lengths (Step+Text+Needle plots);
ods html5 path='/home/ted.conway/Oscars2025' body='oscars2025.html' options(bitmap_mode="inline");
ods graphics / reset imagemap=on height=6in width=24in imagefmt=png noborder imagename='Oscars2025'; * Use SVG format for clicable web page;
proc sgplot data=movies2 sganno=images nowall noborder noautolegend ;
styleattrs backcolor=black;
inset "2025 Academy Awards Best Picture Nominee Runtimes" 
      "Click Image to View Trailer on YouTube" / textattrs=(color=white size=18pt weight=bold) position=topleft;
needle x=movie y=minutes / lineattrs=(thickness=4pt color=white); * Show a drop line from image to baseline ("lollipop" chart);
step x=movie y=minutes / justify=center lineattrs=(color=white thickness=2pt); * Step chart of time for each movie;
text x=movie y=minutes text=length / strip contributeoffsets=none pad=3 textattrs=(size=12pt color=white weight=bold) position=top; * Display time (hours and minutes);
xaxis display=(nolabel noticks noline) valueattrs=(color=white weight=bold size=12pt) offsetmin=.06 offsetmax=.06; * X-axis displays movie names in ascending runtime order;
yaxis display=(nolabel noticks noline) valueattrs=(color=white weight=bold size=12pt) values=(0  60 120 180 225) valuesdisplay=('0' '60' '120' '180' ' '); * Y-axis displays runtimes (minutes);
refline 0 60 120 180 / axis=y lineattrs=(color=grey) label=""; * Display reference lines for each hour; 
run;
ods html5 close;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1074 views
  • 3 likes
  • 1 in conversation