How MPs submit amendments and how they adopt them

Country/area: Ukraine

Organisation: NGO CHESNO Movement (chesno.org)

Organisation size: Small

Publication date: 20 Oct 2020

Credit: Oksana Stavniichuk

Project description:

The project is an online tool, where the stakeholders could find the information regarding the amendments of MPs’ (how many amendments MPs propose and how many were succesful), information about voting activities of each MP and its faction or group, and an interactive network of MPs representing co-authorship amendments. It is also possible to download the raw data about mentioned activities to explore the activities more deeply. 

Impact reached:

Our project is the first online tool where journalists, analysts, and politicians could observe MPs’ activities and even detect anomalies in behavior. In Ukraine, the amendments are widely used amongst politicians to postpone or delay the bills’ passing in Parliament. For instance, this app can demonstrate who is trying to postpone the Land Market Law and other socially useful initiatives. It also helps the journalist pay attention to a specific bill if it was overwhelmed with amedments. Besides, we believe politicians and assistances use it as well.  

Doing this project, I also paid attention to the problem with open data regarding MPs’ activities. The amendments activities and access to this information still is a problem. We are trying to do a small advocacy campaign regarding open data and transparent processes in Parliament. Moreover, it is very problematic to detect whose amendments have successfully passed Parliament. Our network of co-authorship helps to resolve this problem.  

Techniques/technologies used:

The tool is made entirely in R. I have built the interactive web application in a shiny library. I used shiny related libraries like shinythemes to improve my app’s look. The MPs’ voting activities are available as open data, and I downloaded it directly from Open Data Portal. It needs some wrangling and cleaning, for which I used dplyr, splitstackshape, tidyr and tidytext libraries.

Since the second needed part regarding the amendments submissions of MPs is not available as open data, I parsed it from the official web site of Parliament. To get data from the static HTML pages of MPs, I used rvest and xml R libraries. Also, I used ggplot and ggplotly for visualizations and R libraries for cleaning and wrangling data.

Thirdly, I build a network, nodes and edges, based on bills’ activities of MPs. I did an interactive network in networkD3 library, which is an integration of D3 into R.

What was the hardest part of this project?

Firstly, I am very proud that I made this project from the beginning to the end on my own with a little help from an IT colleague who helped me deploy it. In the beginning, I wrote two articles about MPs amendments, and I even won an open data competition on this topic. Afterward, I decided that it would be useful to have an online application where everyone could check and download amendments data. 
Secondly, building application was quite challenging for me because I needed to learn a shiny library. It took me some time to draw the website’s structure and ensure that it works smoothly for everyone. Nowadays, the app serves well, but, of course, there is always space for how I can improve it. 

What can others learn from this project?

This project aims for Ukrainian stakeholders like investigative journalists, analytical and policy centers whose job is concentrated on political topics and corruption. Since not all of them can put time and energy into dirty process of gathering and cleaning data, my application helps them eliminate this work stage. The app can detect MPs’ hidden behavior and voting activities, observe the most modifies by amendments bills, and look at the most successful MPs’ initiatives and propositions to statements.  It does not always mean that the anomalies or interesting patterns could be detected at first sight. However, it gives a reason to dive deeply to investigate a potential conflict of interest or hidden cooperation between individual MPs groups. 

Project links: