Search⌘ K

Automating Vote Tabulation

Explore how to automate vote tabulation by scraping parliamentary voting data with Python. Learn to categorize votes as party or non-party line by analyzing Yeas and Nays, handle URL extraction techniques, and filter unanimous votes to gain insights into government voting behaviors.

Identify the votes

The first problem we’ll need to solve is identifying the votes we want to analyze. We’ll use our old friend pd.read_html to scrape the page that lists all the votes on private members’ bills from the first session of the 42nd42^{nd} ...