Member-only story
How I Found an Error in the National Archives Data
Hey everyone! I have a fun story to share with you all. Recently, I’ve been working on a small website that showcases historical data from past presidential elections (you can check it out at mapthevotes.org!). The site is built on WordPress, but I clean the data using a Jupyter Notebook (all my Python code is there) and use JavaScript to build the interactive map and tables on the site.
While building the website, I wanted to ensure I had the most reliable dataset for this project. After some research, I decided the National Archives would be the best source for election data. I went to their election results page, downloaded the data, and began scraping it for use in my website.
My data-gathering process was pretty straightforward: I copied the data from their website, then imported it into my Jupyter Notebook to map the results to each state, and finally, converted the data into a JavaScript table. Everything was going smoothly until I reached the 1864 presidential election. When I imported the data into my notebook, I noticed that the total votes didn’t match the actual election totals — specifically, Abraham Lincoln’s total had an extra vote.