Announcing the R Election Analysis Contest

Today I am happy to announce the R Election Analysis Contest. The goal of the contest is to encourage and promote high quality reproducible research in R that focuses on elections. The winner will be featured on my blog and receive a free copy of my course Mapmaking in R with Choroplethr as well as a copy of Hadley Wickham’s book Advanced R.

Why a contest?

As I write this, the US Presidential Primary is dominating the news. What strikes me about the news is how analytical the discussion is. Major themes seem to be:

  • The demographics of each voting region
  • How different demographics are attracted to each party
  • How different demographics are attracted to each candidate within each party
  • How the above change over time
  • The math behind delegates and winning both primary nominations and general elections

A major interest I have is using R to verify claims that I hear in the media. I’ve been wanting to explore voting related issues in R for a while now. And when I read pieces by Julia Silge (1, 2, 3) and Duncan McIntosh (1) I see that I am not alone.

Rather than spending a week or two on my own analysis, I think that it would be better to run a contest. If the contest gets even a modest number of entries, then I will probably enjoy reading them more than I would enjoy writing my own.

How do I enter?

To be considered, your entry must:

  1. Be published online by Saturday April 16, 2016. If you have a blog, you can publish it there. You can also use rPubs, which is free.
  2. Leave a comment on this page with a description and link to your entry. I will personally read each entry.
  3. Your entry must contain an analysis that is both written in R and reproducible. That is, you must write code that works and use data that other people can load. Think of yourself as both writing an analysis and teaching other people how you did it.
  4. Winners will be announced on my blog on Monday, April 18 2016.

FAQ

  1. Can I submit more than one analysis? Sure.
  2. Can I analyze an election other than the 2016 US Presidential election? Sure. It can be about a past election, an election for another office, or even an election in another country.
  3. Can I enter as a group? Sure. In the case that a group wins all members will get a free copy of Mapmaking in R with Choroplethr. But I can only afford to buy one copy of Advanced R.
  4. Do you have any ideas for analyses to do? Yes, but I’d rather not share them. I’m certain that someone reading this has an interesting idea that I haven’t even considered. I’d rather encourage that person to publish and submit their own analysis.
  5. How can I get in touch with you? Via twitter or email.
  6. How can I support the contest? Click the “share” buttons on this page to share it with your friends. Or click the button below to tweet about it:
Announcing the R Election Analysis Contest #rstats #ddj #opendata Click To Tweet

 

Comments on Announcing the R Election Analysis Contest

  1. Gabriel Kopito says:

    Awesome!

    1. Ari Lamstein says:

      Thank you! I hope that you decide to submit an analysis!

    1. Ari Lamstein says:

      Great work! Congrats on being the first submission!

  2. Karim L says:

    How exciting! I will do my best…

    1. Ari Lamstein says:

      I look forward to your submission!

  3. Alexander Podkul says:

    Here’s a quick analysis I mocked up – hopefully I’ll get around to making another submission!

    https://rpubs.com/apodkul/166524

    1. Ari Lamstein says:

      Great entry! I l was not aware that donation data was publicly available at all, let alone at the county level!

  4. Hi I got a message from Tal about submitting to the contest. Where do I do it? I can submit both election apps 🙂

    1. Ari Lamstein says:

      Great! To enter just leave a comment on this blog post with a link to your entries!

      1. 54.191.51.69/Elections/USA2016/shiny

        1. this is the israeli election app. it has more stat features (bootstrapping the mandates distributions using sampling errors and user built government coalitions based on real and resampled results) than the USA one

          https://yonicd.shinyapps.io/Elections/

  5. james igoe says:

    I am an R, as well as statistics, novice, and do not have an formal accreditation other than the usual tertiary education, but have always enjoyed working with statistics and data. Recently, I’ve started exploring both R and Python on old data sets I considered trying to publish about. Anyway, here are my entries:

    Chi-Square in R on by State Politics (Red/Blue) and Income (Higher/Lower):

    http://dataanalyticsworkouts.blogspot.com/2016/03/chi-square-in-r-on-by-state-politics.html

    Decision Tree in R, with Graphs: Predicting State Politics from Big Five Traits:

    http://dataanalyticsworkouts.blogspot.com/2016/03/decision-tree-in-r-with-graphs.html

    Logistic Regression in R on Politics and Income:

    http://dataanalyticsworkouts.blogspot.com/2016/03/logistic-regression-in-r-on-politics.html

    1. Ari Lamstein says:

      Great! Thank you!

    2. Ari Lamstein says:

      Can you update your entries to say where the data comes from, and provide a link to the source of the data?

  6. d sparks says:

    Here is a post detailing how to plot Congressional ideology over time: http://is-r.tumblr.com/post/33765462561/the-distribution-of-ideology-in-the-us-house

    The same blog has several posts on mapping with R, for example:
    Mapping the Gerrymander: http://is-r.tumblr.com/post/38619550409/measuring-the-gerrymander-with-spatstat
    Dot density maps of electoral returns: http://is-r.tumblr.com/post/37397867444/dot-density-maps-with-spsample

  7. Peter Ellis says:

    Great contest, motivated me to get started on something I’ve thought of for a while… I’ve started my entry here: http://ellisp.github.io/blog/2016/04/03/nzelect1/

    I’ll be doing two or three additional posts, you can consider them as separate entries or the whole thing as a single entry with parts (which is probably more the way I’m thinking of it). I’m creating a new R package to give convenient access to New Zealand general election results, doing some sample analysis and a Shiny app, and hopefully will get onto some real analysis of spatial trends in voting behavior.

    1. Ari Lamstein says:

      Great! I look forward to your next entry!

      1. Peter Ellis says:

        My second ‘entry’ is really an extension of the first, going into more detail of how the R package was built, and is at http://ellisp.github.io/blog/2016/04/04/nzelect2/ . The third and (hopefully) fourth will be more stand alone bits of analysis!

  8. Julia Silge says:

    I had one more bit of election analysis I wanted to do, so I have a new post here on voter turnout in Utah’s caucuses this election cycle:
    http://juliasilge.com/blog/Who-Came-To-Vote/

    1. Ari Lamstein says:

      Thank you!

  9. Peter Ellis says:

    Next in my series – this time looking at micro-spatial contrasts between selected parties in selected locations, and creating a leaflet/shiny app for others to explore http://ellisp.github.io/blog/2016/04/09/nzelect3/

    1. DANIEL MENDOZA says:

      Clearly we have a winner.

  10. DANIEL MENDOZA says:

    An analysis of tweets directed to Mr. Trump and those originating from his own twitter.
    Link to the report: https://drive.google.com/file/d/0B_7vDlyLlG39bjFYbU0yMmxpcEU/view?usp=sharing

    Because of the amount of time it took search twitter for tweets directed towards Mr. Trump I am also including a data frame with these tweets: https://drive.google.com/file/d/0B_7vDlyLlG39NkpILXl0UV9TWEE/view?usp=sharing

    1. Karim L says:

      @Daniel I am loving your report !!

  11. Karim L says:

    @Daniel your report is fascinating !

    1. Karim L says:

      Sorry for the unintended double post. Could you provide some pointers as to how to get a developer’s key ?

      1. Karim L says:

        Never mind, all set ! [/endspam]

      2. DANIEL MENDOZA says:

        No worries Karmin, I am glad you love the post and hopefully you like some of the additional analysis I plan to do on the data.
        In order to get a developer’s key point your browser over to: https://apps.twitter.com/
        Create an app and plug away into you get an API_key and a secret_key. One thing to note, the documentation instructs that you set the callback URL to http://127.0.0.1:1410

  12. Peter Ellis says:

    My final entry, or component of my multi-part entry, however you want to treat it, now available at http://ellisp.github.io/blog/2016/04/16/nzelect4/

  13. Alexander Podkul says:

    One last entry! Looking at the accuracy of the primary polls in the 2016 GOP Primaries.

    http://rpubs.com/apodkul/171567

  14. http://rpubs.com/vijayvithal/BBMP-Election-2015
    My analysis of the BBMP elections that took place last year in Bangalore, India

Comments are Closed