Inspiration

We took inspiration from our school's Advocacy Project Team. The club is always looking for ways to reform society through legislation, and that piqued our interest! As such, we were also inspired by the fact that elections take place in November. With all the controversies circulating in our country today (Abortion, Gun Rights, Environment, etc.), the people need to be adequately informed about the political candidate they are voting into office. We took it upon ourselves to build a tool that would do just that: reveal politicians' true voting stances, thus making the average Joe confident in their vote!

What it does

This project takes the form of a website called VoteReal. The user can input the name of their local congress member (House or Senate), state legislature member, or their home zip code/address to get a list of their local representatives. Clicking on the desired representative will pull up an extremely detailed history of their stances on various topics. These stances are calculated using Natural Language Processing run on every single related bill. For example, for the topic of Gun Control, the application will calculate the representative's stance (Pro Gun Control, Anti Gun Control) based on every single bill about abortion that the representative has voted on.

How we built it

We utilized the LegiScan API and the VoteSmart API to fill a database of over 125,000 bills, dating back to 2001. We then used Python to efficiently categorize those bills into separate topics: Abortion, Gun Control, Environment, etc. For each grouping of about 12,000 bills each, we trained a Natural Language Processing (NLP) model that would read each bill in its entirety and decide whether it was for/against said category. Based on this data, we drew upon the list of representatives who voted on the bills and thus calculated their stance on the topic.

In addition to the stance and bill list, our app also has an interactive map that shows the correlation between different types of bills and representatives per state!

The client is built in React, while the server is built in both Express (Node.js) and Python. Much of the inference work with NLP was done in Python while communication was done in Javascript.

Challenges we ran into

Due to the enormity of the project we sought to undertake, we didn't take into account that we might be requesting too much data. We requested so many bills from the LegiScan API that they automatically forced a global shutdown of the API, inaccessible by any means until they figured out what was happening. With half of our data yet to be downloaded, we decided to use the VoteSmart API instead--it turned out to be a much better investment, as theirs provided relational data that allowed us to connect legislators to their bills much easier!

Accomplishments that we're proud of

We were really proud of our NLP model! It's the product of over 5-6 hours of continuous effort put into tuning, and it works very well. We are also proud of our interactive map, written in d3.js, providing a useful visualization of the relationships in our data.

What we learned

We learned that its a very good idea to have a solid plan coming into the hackathon! Every member of our team has experienced uncertainty in the past, and it lifted much of the stress to know exactly what we were doing most of the time.

We also learned quite a lot about writing and training an NLP model through TensorFlow.

What's next for votereal.

In the future, we plan to expand to more and more categories, making the application much much more accessible. Due to the time-constraint at this hackathon, we weren't able to classify legislator stances on all our topics.

Built With

Share this project:

Updates