Let Python decide your next movie

Vatsal Patel

Vatsal Patel / January 23, 2022

2 min read––– views

Movie choices

Movies are a commitment. A great movie can temporarily transport you to a different world, but a bad one drains your energy and happiness until you promise yourself never to watch another movie of that type again. As a self-identifying nerd, I try to avoid these life-sucking scenarios by checking the rating of any potential movie on Rotten Tomatoes.

When you open a movie page on Rotten Tomatoes (like this one) you will (usually) be presented with two different scores; the Tomatometer Score ( critic rating ) and the Audience score. In my experience the latter quite accurately mirrors my own rating whereas the Tomatometer score seems to bias towards particular types.

So using the audience score defends me against a bad movie. But what about those lazy weekends and holidays when I just want to choose a movie from a pool of high audience score movies? Surely Rotten Tomatoes would allow this... right?

Well, it turns out there is no way to easily to do that! You're stuck sorting by release date or the terrible Tomatometer score.

So, I did what any software engineer with too much time on their hands would do: code. I scraped data for all the movies in the Rotten Tomatoes dvd-streaming list and created a graph of release date vs audience score and a handy tool to randomly find myself a good movie [1]. I've shared them below so you can play around with them too.

Find your next movie

Choose a minimum rating and hit the button!

The below graph is best viewed on a desktop/laptop. I've truncated the final graph to only show movies after the year 2000. If the tooltip cuts off when hovering over a data point move the graph down using the drag tool and hover over the point again.

You can view and clone the code I used to generate this on my GitHub account. Feel free to submit a pull request if you have suggestions to improve the code. I may delve into the implementation details and some of the problems I faced in a future blog post.

[1] I've omitted movies which didn't have an audience score or had less than 250 ratings submitted. There are probably some I missed through scraping errors!