When Math Meets Politics

By Tom Porter

Two summer fellows, both rising juniors, describe how they are using their math and computer science skills to explore Maine voter behavior. One is digitizing the state’s voting records (specially twentieth century data), while the other is looking at factors affecting voting patterns. 

gillian king

Name: Gillian King

Class Year: 2022

Project Title: Digitizing Maine's Voting History with a Statistical Analysis of Error Rate

Faculty Supervisor: Professor Jack O’Brien

Fellowship Name: Kufe Family Research Fellowship

Essentially, the project goal is to digitize election results for gubernatorial, state, congressional, and presidential elections (as well as referendum questions) in Maine, concentrating especially on the twentieth century. These results will be compiled in a website that will be made available to the public, as well as to future researchers.

As a student aspiring to attend graduate school for mathematics, I was in search of a summer research position that would allow me to further develop the skills I learned in the classroom at Bowdoin in an environment that was familiar to me. Professor O’Brien’s project fits all of these criteria.

My research has been largely data-focused. I have been experimenting with various software  programs (including Optical Character Recognition and ABBYY FineReader) to convert handwritten voting results into a digital format. I have then been compiling and organizing these results by year, county, and town.

I am also analyzing the error rates of the software. With Professor O’Brien’s help, I have built a code using the programming language R that randomly selects a column and row of my data sheet in order to assess its correctness. Other tools for error analysis involve plotting the data to identify individual outliers, as well as summing up town totals and seeing if they jive with the totals given in the original, handwritten document.

olcott '22

Name: Jack Olcott

Class Year: 2022

Project Title: A Statistical, Historical, and Political Approach to Analyzing Maine’s Election Data

Faculty Supervisor: Professor Jack O’Brien

Fellowship Name: Kibbe Science Fellowship

I chose this fellowship because it was a unique opportunity to combine elements of my major (government and legal studies) and my minor (computer science). A large part of my project was creating an interactive web application called a "shiny app" using the statistical programming software RStudio. Essentially, I created an app that allows the user to choose the year and question number for a particular referendum question, and then it plots the distribution of yes votes per town across Maine. You can take a look at what the app looks like with data from 2012 to 2017 here. By creating this app, I was able to improve my programming skills while also gaining an important understanding of Maine's political landscape.

This project is important because the ultimate goal is to make the referendum data and the related statistical tools, like the shiny app, available as an open-source database. It has set the groundwork for a database that can be used by future researchers and students to investigate Maine's electoral history.

I learned a ton about coding in R, and I also learned that I kind of love making cool graphs with coding. I have obviously only scratched the surface of what I can do with R, but it was really rewarding to vastly improve my coding ability.

olcott graph
"I created an app that allows the user to choose the year and question number for a particular referendum question, and then it plots the distribution of yes votes per town across Maine." (One of Olcott's "cool graphs.")