<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Stephen Sinclair on Medium]]></title>
        <description><![CDATA[Stories by Stephen Sinclair on Medium]]></description>
        <link>https://medium.com/@smsinclair?source=rss-d831ec769366------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*kNIF6Apk_9IC8x7w.jpg</url>
            <title>Stories by Stephen Sinclair on Medium</title>
            <link>https://medium.com/@smsinclair?source=rss-d831ec769366------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 14:22:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@smsinclair/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Do shark attacks hurt incumbent presidents?]]></title>
            <link>https://medium.com/@smsinclair/do-shark-attacks-hurt-incumbent-presidents-3cab7bbdbac7?source=rss-d831ec769366------2</link>
            <guid isPermaLink="false">https://medium.com/p/3cab7bbdbac7</guid>
            <category><![CDATA[politics]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Stephen Sinclair]]></dc:creator>
            <pubDate>Tue, 04 Jun 2019 00:27:47 GMT</pubDate>
            <atom:updated>2019-06-04T00:27:47.017Z</atom:updated>
            <content:encoded><![CDATA[<p>One of the most well-known attempts to use economic data to explain presidential election results is Douglas Hibbs’ <a href="https://douglas-hibbs.com/">“Bread and Peace”</a> model. It uses increases in real per-capita disposable income and military fatalities to predict the vote share that the incumbent party will get in an election.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*-r_ki-A7akyotIg4MU1cnA.gif" /></figure><p>As an exercise, I decided to replicate his model with a variable that had a spurious correlation to vote share: <a href="http://www.sharkattackdata.com/">unprovoked shark attacks</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*8e6hTwT-X_g7goJuPM2QUw.png" /></figure><p>Conveniently, the election years with 30+ shark attacks happened to have low incumbent party vote shares, and the line of best fit looks fairly sensible. I was interested to see how the correlation compares to the actual variable used in Hibbs’ model:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*3ECqSgc1vXfUlb4BWjmlTA.png" /></figure><p>While military fatalities predict about 13.28% (r² = 0.1328) of the variation in incumbent party vote share, shark attacks predict about 7.78% (r² = 0.0778). Was there really some sort of connection there?</p><p>After some googling, I found that Princeton professors Christopher H. Achen and Larry M. Bartles seem to think so. In a 2012 <a href="https://www.vanderbilt.edu/csdi/research/CSDI_WP_05-2013.pdf">paper</a> they used the effects of shark attacks on elections as an illustration of their problems with a theory called “retrospective voting.” (for a counterpoint, see <a href="https://www.journals.uchicago.edu/doi/abs/10.1086/699244">this paper</a>)</p><p>I’ll leave it as an exercise to the reader to decide what the true relationship between shark attacks and incumbent party vote shares is. But my Bread and Sharks model performed pretty admirably, all things considered:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IQcjiu2z6eXSbIVJsJPIAQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3cab7bbdbac7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Did Iron Man kill the romantic dramedy?]]></title>
            <link>https://medium.com/@smsinclair/did-iron-man-kill-the-romantic-dramedy-c1ede5193592?source=rss-d831ec769366------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1ede5193592</guid>
            <category><![CDATA[film]]></category>
            <category><![CDATA[movies]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Stephen Sinclair]]></dc:creator>
            <pubDate>Fri, 24 May 2019 03:55:36 GMT</pubDate>
            <atom:updated>2019-05-30T04:26:32.599Z</atom:updated>
            <content:encoded><![CDATA[<p>I started with the <a href="https://www.kaggle.com/rounakbanik/the-movies-dataset">Movies Dataset</a>, which contains metadata for over 45,000 movies listed in the Full MovieLens Dataset in 2017. The data comes from both the <a href="https://www.themoviedb.org/en">The Movie Database</a> (TMDb) API and from the official <a href="https://grouplens.org/">GroupLens</a> website. Out of 45,466 movies in the Movies Dataset, I decided to look at the 7,408 that had non-zero revenue data.</p><p>For each of these movies, I used an IMDb id to find it in the <a href="http://www.omdbapi.com/">Open Movie Database</a> (OMDb). Finally, I chose the features I wanted from Movies Dataset and OMDb and combined them into a pandas dataframe. The first feature I looked into was genre. Here is a list of the number of movies from the 20 most common genres in the data set:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/339/1*EYrAwHFYOJoauWdOhG1SlA.png" /></figure><p>From this list you can see that classifying movies by genre can be tricky. <em>The Graduate </em>has “Comedy, Drama, Romance” listed. Should we consider it a comedy, drama, or romance? A romantic comedy? Or all three at the same time? There’s an obvious tradeoff. The more specific we make a genre, the more likely it is that the movies share thematic similarities. But it’s also more likely that similar movies get divided up into large number of micro-genres.</p><p>I decided to see what would happen if I treated the full list of genres for each movie as its own hybrid genre. For example, I took the movies with their genre listed as “Comedy, Drama, Romance” to be members of a “romantic dramedy” hybrid genre.</p><p>The result was a group of 331 movies that seem to share the kind of qualities we’d want movies in a genre to share. I started by plotting the total box office revenue (adjusted for inflation by the historical ticket prices from the MPAA) of every movie in the genre by year:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xk-H1D08lYL0Y9DR2YWbAQ.png" /></figure><p>There are several sharp peaks in the graph, especially before 1990. This is because nearly all the box office revenue from those peaks are due to a single very successful film. Arguably, these movies set the norms for the genre and influenced the movies that enjoyed success during the genre’s peak between 1995 and 2009.</p><p>Why did the genre plummet in popularity after 2009? There wasn’t a drop in box office revenue due to the financial crisis or the rise of streaming services. My theory was that studios stopped making as many mid-budget romantic dramedies when big-budget blockbusters started to dominate the box office. But was <em>Iron Man</em> really responsible for the death of the romantic dramedy?</p><p>To find out, I plotted the romantic dramedy against the box office revenue of action-adventure movies with sci-fi or fantasy elements from 1990 to 2016:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qh18dZXMpc7m92A49cZyqA.png" /></figure><p>There’s definitely a correlation here. Box office revenue for romantic dramedies is about even with action-adventure genre films in 2008. Then it plummets as the revenue for the action-adventure blockbusters soars.</p><p>Is that a coincidence, or does it represent an intentional shift by movie studios? I took a look at return on investment for films in both genres to see if that could be the reason:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gb0v5ShQe9CT9T1FDslZOg.png" /></figure><p>As you can see from the chart, the action-adventure genre films produce 2–6x returns on investment more consistently than romantic dramedies and are less likely to be unprofitable. Their budgets are also much higher, with a median budget of $158,950,700 as compared to $19,850,670.</p><p>So, one explanation for the decline of the romantic dramedy could be that studios have shifted their focus to superheroes and space operas because they’ve honed a formula to reliably make large profits with those films. But is that really what’s happening? <a href="https://github.com/SMSinclair/Movie-Genre-Visualization">Take a look</a> my code and decide for yourself.</p><figure><a href="https://usejournal.com/?utm_source=medium.com&amp;utm_medium=noteworthy_blog&amp;utm_campaign=the-arts&amp;utm_content=guest_post_image"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PYxBP_WV7LI6zc-zdUkNqQ.png" /></a></figure><p>📝 Read this story later in <a href="https://blog.usejournal.com/r/?url=https%3A%2F%2Fusejournal.com%2F%3Futm_source%3Dmedium.com%26utm_medium%3Dnoteworthy_blog%26utm_campaign%3Dthe-arts%26utm_content%3Dguest_post_read_later_text">Journal</a>.</p><p>🎨 Wake up every Sunday morning to the week’s most noteworthy stories in The Arts waiting in your inbox. <a href="https://blog.usejournal.com/r/?url=https%3A%2F%2Fusejournal.com%2Fnewsletter%2Fnoteworthy-in-the-arts%2F%3Futm_source%3Dmedium.com%26utm_medium%3Dnoteworthy_blog%26utm_campaign%3Dthe-arts%26utm_content%3Dguest_post_text">Read the Noteworthy in The Arts newsletter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1ede5193592" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>