European Parliament Voting Tracker

Interactive analysis of trade policy voting patterns in the European Parliament

I developed the European Parliament Voting Tracker to provide Borderlex journalists with timely insights into crucial trade policy decisions in the European Parliament. I built a domain-specific system focused exclusively on international trade policy votes, enabling detailed analysis of voting patterns across all MEPs from 2019 to present. The tracker serves as a key component of Borderlex's comprehensive Datahub, ensuring journalists have centralized access to parliamentary voting data alongside other trade policy resources.

The system addresses the challenge of identifying meaningful patterns in complex voting data. Through interactive visualizations, users can uncover noteworthy stories about MEP voting behavior—for instance, discovering that while MEPs from most countries supported a trade measure, representatives from one country were divided, with opposition votes concentrated in specific political groups. Such analytical capabilities enable journalists to identify influential members, groups, or countries that played pivotal roles in trade policy decisions.

Technical Implementation and Data Collection

I built two complementary voting trackers that handle different data sources within the European Parliament structure. For plenary votes, I integrated the European Parliament's official API, while for Committee on International Trade (INTA) votes, I developed a custom PDF parsing system to extract structured data from unstructured documents.

The PDF parsing component presented significant technical challenges, as PDFs are designed for presentation rather than data storage, requiring a combination of text analysis and layout interpretation to extract meaningful data. I leveraged Python libraries for pattern recognition to analyze both text content and document layout, extracting voting data from complex tables. To ensure data accuracy, I verified extracted information against my database, catching inconsistencies such as typos in MEP names.

To maintain focus on trade policy content, I implemented multiple filtering layers using the same text classification model I developed for the Live Document Hub, combined with semantic search against trade-specific vocabulary and targeted keyword filtering. This ensures the interface presents only relevant trade policy votes to users, while maintaining a comprehensive database of all parliamentary voting activity.

I used Pydantic for robust data validation throughout the pipeline and built a command-line interface with Typer to automate data collection, ensuring the system stays current with new votes as they occur.

Interactive Dashboard and Visualization

I designed and built an interactive dashboard using D3.js that transforms complex voting data into accessible visual insights. The dashboard features integrated cross-filtering capabilities across multiple chart types:

  • A donut chart showing overall vote outcomes
  • An interactive map displaying voting results by country with detailed tooltips
  • A bar chart breaking down results by political group
  • A comprehensive table of individual MEP voting decisions

The cross-filtering functionality enables sophisticated analysis—users can click on the opposition portion of the donut chart to filter all visualizations to show only "against" votes, then select a specific country on the map to reveal which political groups drove the opposition in that nation. This interactive approach allows journalists to quickly identify patterns that would require extensive manual analysis using traditional tools.

For example, in analyzing a recent trade agreement vote, a user might discover that while MEPs from most countries voted in favor, representatives from one country showed division. By filtering the dashboard, they could reveal that all opposing votes from that country came from just two political groups, uncovering a targeted story about domestic political divisions on trade policy.

User Interface and Member Profiles

I integrated the voting visualizations into a Django web application with comprehensive search functionality. Users can locate specific votes using document references or date ranges through an intuitive calendar interface. The system includes individual MEP voting history profiles, providing journalists with detailed records of each representative's positions on trade issues.

Much of the dynamic functionality relies on HTMX to create responsive interactions without complex page reloads, ensuring smooth user experience during data exploration.

Strategic Value and Impact

The Voting Tracker enables Borderlex to provide timely analysis of trade policy developments in the European Parliament while maintaining editorial independence from external tracking platforms. By focusing specifically on trade-related votes and providing unique analytical capabilities, the system supports investigative journalism that reveals the political dynamics shaping European trade policy.