The 96th Academy Awards airs Sunday and - as the above SAS ODS Graphics dot plot illustrates - the oddsmakers certainly like Oppenheimer's chances of winning Best Picture. Enjoy the show!
* Fun With SAS ODS Graphics: And the Academy Award for Best Picture goes to?
Image thumbnails courtesy of bing.com
Odds from sportingnews.com/us/betting/news/oscars-2024-betting-odds-category-predictions-favorites/8b210b67cec4072bff5d3045
American odds to probability formula from calculatorandconverter.com/betting/bet-calculator-odds-converter;
data bestpicturenominees; /* Read in American betting odds of winning and calc probabilities */
input film $26. odds;
if odds>0 then probability=100/(odds+100);
else probability=-odds/(-odds+100);
datalines;
Oppenheimer -5000
Poor Things +2000
The Zone of Interest +2500
The Holdovers +2800
Barbie +3500
Killers of the Flower Moon +4000
Anatomy of a Fall +4000
American Fiction +8000
Past Lives +10000
Maestro +15000
;
ods _all_ close; /* Plot films + odds on animated dot plot */
options papersize=('8 in', '4.5 in') printerpath=gif animation=start animduration=1 animloop=YES NOANIMOVERLAY nodate nonumber;
ods printer file='/home/ted.conway/BestPicture.gif';
ods graphics / antialias width=8in height=4.5in imagefmt=GIF antialias;
%macro films; /* Ten frames, one for each film thumbnail image */
%do i=1 %to 10;
%let image=%scan("Oppenheimer, PoorThings, TheZoneOfInterest, TheHoldovers, Barbie,
AnatomyOfAFall, KillersOfTheFlowerMoon, AmericanFiction, PastLives, Maestro", &i, " ,");
data filmimage; /* Poistion images in center of plot area */
retain function "Image" anchor "center" x1 50 y1 50
drawspace "wallpercent" x1space "wallpercent" y1space "wallpercent" layer "front"
id "filmimage" Image "/home/ted.conway/BestPicture/&image..jpg";
/* Dot plot of films with odds in descending order */
ods graphics / antialias height=4.5in width=8in;
proc sgplot data=bestpicturenominees sganno=filmimage;
dot film / response=probability categoryorder=respdesc markerattrs=(symbol=circlefilled size=10pt);
inset " " "2024" / position=top textattrs=(size=11pt weight=bold);
inset "BEST PICTURE NOMINEES" " " / position=bottom textattrs=(size=11pt weight=bold);
yaxistable probability / position=right nostatlabel label="Prob" valueattrs=(size=12pt) labelattrs=(size=12pt);
yaxistable odds / position=right nostatlabel label="Odds" valueattrs=(size=12pt) labelattrs=(size=12pt);
format probability percent6.1;
xaxis display=(nolabel) valueattrs=(size=12pt) valuesformat=percent6.;
yaxis display=(nolabel) valueattrs=(size=12pt);
run;
%end;
%mend;
%films; /* Run the macro to produce the animated GIF! */
options printerpath=gif animation=stop;
ods printer close;
Update 😀
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.