12/3/2018

Ruralômetro: Evaluating how Brazil’s congressmen impact socio-environmental issues

 

By Reinaldo Chaves, Repórter Brasil

Ruralômetro is a database and interactive tool that measures how Brazil’s federal congressmen have impacted on the environment, indigenous peoples, and rural workers.

In Brazil, agribusiness is a billion dollar industry, exporting to hundreds of countries and generating thousands of jobs. However, this growth is often accompanied by environmental aggression, disregard for labor laws, and/or the rights of traditional communities.

Over the course of six months, the Ruralômetro project investigated parliamentary activities, with the aim of identifying those that promote the above unethical by-products of agribusiness in Brazil.

Developed by Repórter Brasil, with a multidisciplinary team, the tool is based on two main databases that measure the performance of parliamentarians in two areas: their votes in the legislature and the laws that they have each proposed.

Repórter Brasil was founded in 2001 by journalists, social scientists and educators, to encourage reflection and action against the violation of the fundamental rights of people and workers in Brazil.

Data extraction

To pinpoint those parliamentarians that contributed to laws with socio-environmental impacts, we first put together a list of votes in relation to certain laws. These were identified by various socio-environmental organizations in Brazil, including the Socio-environmental Institute (ISA), Pastoral Land Commission (CPT), National Confederation of Agricultural Workers (Contag), and Greenpeace.

In total, 131 bills were evaluated from 14 nominal voting sessions. Each bill was according to their positive or negative impact on the environment, indigenous peoples, and rural workers. For example, laws that increased unprotected forest areas, expanded outsourcing of labor, and make it difficult to combat slave labor in the countryside, were given negative ratings.

We used a program in Python to scrape these projects and votes from the House of Representatives website. These data were then crossed referenced with the official list of the 513 deputies elected in 2014 (the last national election in the country). The focus of the work was only the 513 elected, rather than any substitutes who may have taken office after 2014.

To ensure that our data only reflected elected parliamentarians, we conducting further screening using the database of the Higher Electoral Court and compared it with the information we scraped from the Chamber of Deputies.

In addition to votes and authorship of bills, we examined official donations received by these politicians to identify any ties with unethical agribusiness activities.

In Brazil, the Superior Electoral Court collects data on donations, including the names and national codes of identification for the companies and people who have donated to MPs, as well as the donation value in money or material goods. We collected these data from the website with Python (pandas) and then cleaned it for analysis. We then cross-checked donations to deputies with lists of environmental infractions in the country from the Brazilian Institute of Environment and Renewable Natural Resources (the federal environmental agency), which has data about companies and individuals fined for environmental infractions, including relevant national codes of identification. We also looked at data provided by the Ministry of Labor on companies and individuals employing people in conditions similar to slavery.

From the above analysis, it was possible to find out which congressmen received "dirty campaign funding”. For example, we discovered a federal deputy who received more than R$ 2 million in campaign donations from a company fined for environmental pollution, and another deputy who received half a million reais from a company accused of employing labor in conditions of slavery in construction. This type of information is important to identify connections between the donations received by parliamentarians and votes or work on bills that may serve the interests of donating parties.

We ended up processing data relating to more than 400,000 donations. To aide our analysis, we used libraries and Python modules for analysis and scraping, such as pandas, numpy, requests, Beautiful Soup, selenium and phantom js.

Some programs, for example, scraped information from the Chamber of Deputies website to create the profiles of deputies. The database was also processed to find various statistics, which were then transformed into dataframes with Python, to answer the following questions:

  • How many and which deputies have environmental infractions?
  • How many and which deputies authored bills relating to relevant projects, and were these considered positive or negative in socio-environmental terms?
  • Which MPs received campaign funding from companies with socio-environmental problems and how much of this funding, as a percentage, made up the total received in their electoral campaign?

In Brazil, there is a lot of public information available thanks to transparency and open data laws, but the way information is disseminated (without standards, bad files, or just online without archives) means that journalists often have to incorporate programming techniques, such as the ones we used, to find the data they are looking for.

Data visualization

From our data analysis, we found that at least 323 federal deputies, or 63% of the Chamber, have a parliamentary performance that is unfavorable for the socio-environmental agendas. That is, they either vote or design projects that have a negative impact on the environment, indigenous peoples and rural workers. This data analysis was supplemented by articles and a chart that generated information about each deputy.  

The graph transforms each deputy into a point, which is positioned according to the thermometer scale. By hovering over the graph, the user has a summary of each politician's information. There are also filters to show particular deputies on the screen, such as those from political party or in a geographic state. There is a search function to filter by name as well. By clicking on a politician’s point, the user can choose to go to a site of this deputy, created by the project, with more detailed data about their impact. More than 400 sites have been created for each Member.

For ease of understanding, the ranking of deputies, taking into account their work on bills and their votes, used the scale of human body temperature: the more projects with negative impact the deputy voted or proposed, the higher its temperature. As you can see, many reach fever levels.

An R-program was used to calculate the temperatures, based on p -defined value scales. All programs are on the project’s Github page.

The big challenge for us was translating all of data the collected into a logical and schematical database (i.e. an Entity Relationship model). The database schema was a foundation of our "building" and it if was bad, all of our models and controllers would be compromised.

That's why the project relied on journalists and programmers working side by side. Data journalists extracted, cleaned, crossed-checked and analyzed the information. This was then sent to developers and designers to create the visualizations, respecting the methodology that the journalists created. Developers and designers were also guided by journalists in relation to the characteristics of the data. For example, there were cases were our donation data listed the same company in several lists (environmental problems and labor problems, for example), but its donation to the electoral campaign was unique. Here, we needed to ensure that the final database was published in a way that would eliminate undue duplications. This was only possible through the joint work of our journalists, programmers and designers.

Explore the project here.

Comments