For my database course's capstone project, we had to implement and design a system that would provide users with historical election results. I teamed up with one other colleague, and together we built PEDS. Our interactive web application equips users with tools to query and visualize a wide array of presidential election related queries.

We designed our relational schema to be able to query not only election results, but also information on every candidate in every election. We also took into consideration U.S. polling data for each candidate and also the U.S. population for every given year.

We programatically scraped every election's results dating back to 1789. Election results were sourced from The American Presidency Project. We utilized the ruby web scraping library Nokogiri to accomplish this task.

We also collected data such as election outcomes and polling for every candidate, including third party candidates, from every election.

We also built in interesting queries into the system, such as the one above. This query shows every president that assumed office without actually winning an election, and the reason why.

To wrap up, we composed a 24 page design document where we give an in depth explanation for our system design and our relational schema, as well as other technical decisions.

View project

View source

View Design Doc