Motivation
Every year debates are held in parliament impacting the UK’s environmental policies. Whether it’s voting to change carbon taxes, incentivising green energy generation or for the building onshore wind farms, the outcome of these votes arguably has a far bigger effect than any individual’s personal contributions to protect the environment.
As such the biggest tool we have as individuals to protect the climate is our ability to vote for MPs who vote to protect the climate and vote out those who don’t. Unfortunately not everyone has the time nor the knowledge to extensively research an MPs voting history. We wanted to make it as easy as possible for people to see how environmentally conscious a given MP is, to help inform voting decisions and we hope EnviroMP does that.
What it does
Through the site you're able to search for a given MP. Each MP has been given a score out of 100 and a rank representing how environmentally conscious we've assessed them to be, the higher the score the better. Clicking on the MP provides a breakdown by individual categories they've voted for. You can also compare MPs side by side and view how every MP scored for a given category. Finally a quick email function lets you generate a templated email to said MP asking why they voted the way they did on a selected issue.
How we built it
The backend queries APIs and scrapes and parses the information on several websites to generate scores for each MP. Since this process takes a long time to complete, we then cache all the processed information into a JSON file on the server. A webserver then presents the information from this JSON file through an API and also serves the frontend website files.
The hard bits
Several different APIs and websites exists providing somewhat similar information, but they are spread across the internet. By using data the parliament members API to get general information about each MP and by then scraping voting data from the HTML on thepublicwhip.org.uk we were able to combine this data from the different sources into our database we could then serve information from. The web scraping is a relatively hacky solution and if thepublicwhip.org.uk were to change some of its HTML or CSS code, it could be broken. The website would continue to work but only using older cached data rather then the most up to date information.
What's next for EnviroMP
We want to continue the project since we think it's a genuinely useful tool. We will continue to work on the interface adding more features to it but will also refine the scoring process, taking into account absences from votes which are currently scored at 50 (halfway between for and against). We will also focus on incorporating more data about MPs and their environmental opinions to create a richer picture of each MP and to have a more nuanced scoring system.
Log in or sign up for Devpost to join the conversation.