The One Where They Can't Decide What to Watch...

A Friends Random Episode Selector

Posted by David Velleca on August 26, 2021

Out of things to watch?

It has been quite awhile since I've had the time to spend on a personal Tableau project, but the other night my wife and I (somehow) "ran out of things to watch" on TV. We ended up watching an episode of Friends, but still then had to choose which of the 236 episodes of American Sitcom Gold to watch. I knew right then that I had my next Tableau project - a "random" episode generator.

Beyond "randomly" picking an episode, I also wanted there to be an element of user interactivity as well as analysis. This was pretty easy to build in, utilizing Tableau's parameter actions to give the user an option to change the "balance" of the Friends characters - want to see more Joey and less Phoebe? No problem - there are 58 episodes where Joey has more dialog than his average and Phoebe has less than her average. Really love Ross' son, Ben? There's an option to include episodes where he has dialog - add that to our more Joey/less Phoebe mix and the number of possible episodes drops to 3.

The big part here, besides the interactivity, was of course to "randomly" pick one episode. I keep putting "randomly" in quotes because, Tableau doesn't come out of the box with a random function that would be suitable for selecting from 236 options. Instead, I've leveraged an element of time to drive a new "random" option every minute. That simplifies things a bit, but if you'd like to tear through the logic, go ahead and download the workbook and take a peek. Also, if you have a better way to drive this randomness, I'm all ears! There are no guarantees that you won't get a repeated random episode here, but they definitely won't happen back to back :).

Last thing - once the dashboard picks your episode for you, click on the HBO Max icon to watch (subscription required). Don't like the random option? Just wait a minute and refresh and you'll have another randomly selected episode for your viewing pleasure.