Gilles Rochefort
9 min readJun 7, 2021

--

Level up your web scraping skills: Extracting 2020 presidential election votes from news images

Photo by Clay Banks on Unsplash

Disclaimer: This is not a political blog. This blog is purely intended to be a technical one and doesn’t reflect any political opinion from the author. It simply demonstrates how to use images as an unusual source of data.

Motivations

During the presidential election week, we have all been flooded by numbers. The constant repetition of the latest counts was overwhelming. The expectation for a final result was exhausting. To fully understand and probably to assimilate what happened during that week, I felt a desire to review the course of actions. I wanted to (re)view how the counts were updated hours after hours.

I was almost certain to find such numbers easily, but the more I was looking for a website, a RSS feed, any dataset. I soon realized that there were no easy way to find the evolution of vote counts as we experienced it.

If you are looking for the latest vote counts or results in your state, in your county, district, chances are that you’ll find well formatted data pretty quickly. But those data only contain the latest counts so far. It doesn’t provides a snapshot of what was going on hour by hour.

I eventually found a way to get my hand on such evolution of voting counts by using images from live news media. I long hesitated to…

--

--