Time evolution of the behaviour of Brazilian legislative Representatives using a complex network approach

The follow up of Representative behavior after elections is imperative for a democratic Representative system, at the very least to punish betrayal with no re-election. Our goal was to show how to follow Representatives’ and how to show behavior in real situations and observe trends in political crises including the onset of game changing political instabilities. We used correlation and correlation distance matrices of Brazilian Representative votes during four presidential terms. Re-ordering these matrices with Minimal Spanning Trees displays the dynamical formation of clusters for the sixteen year period, which includes one Presidential impeachment. The reordered matrices, colored by correlation strength and by the parties clearly show the origin of observed clusters and their evolution over time. When large clusters provide government support cluster breaks, political instability arises, which could lead to an impeachment, a trend we observed three years before the Brazilian President was impeached. We believe this method could be applied to foresee other political storms.

1 Data mining and manipulation.
The data mining consisted of processing individual files containing the results of the rollcall votes of Deputies for each session over 16 years. After identifying each elected Deputy in all sessions per year, a file containing each Deputy name and an associated array of her/his votes, was obtained for each year. Special care was taken to account for partial and total absence frequency of a Deputy in each year. The partial absence zones were filled using information about substitutes for each Deputy. If the information about the substitute of Deputy was scarce, we assume that substitute was a member of the same political party and then, if the absence zones and vote zones coincide, the substitute vote is computed. Deputies with total absences throughout the year without certified substitute were eliminated. The quantity of Deputies and bills after the data processing for each year is shown in Table S1. Year

The Minimal Spanning Tree (MST).
We use a weighted graph G(V, E, W, f ) for designing all networks. We employ the Prim's algorithm to obtain the MST. The Prim algorithm j th step consists of finding the closest pair of vertices to set of (j − 1) th MST sub network N j−1 for each only one vertex, but not the other, belongs to N j−1 . This way the vertex that did not belong to N j−1 is now incorporated into the N j MST subnetwork. It does not matter that another much closer pair of vertices exists, but none of the vertices are yet connected. As the algorithm interacts in a complete network, eventually, all pairs of vertices will be connected. This shows that MST connections can be the best way to connect the closest neighbours and display the clusters in the correlation, or distance, matrices. Our procedure, therefore, was to use the correlation matrix to obtain the MST and then reorder rows and columns of the correlation matrix with the MST-prim order. All MST networks were designed using the software package Pajek and we rearrange vertices manually to avoid much line crossing. Fig S1 shows  3 Correlation distribution fitting.
The fitting was made over the cumulative distribution because this distribution is independent of the choice of the bin range. The procedure was carried out by minimizing the sum of residual squared between the fitting function and the experimental data. Table  S2 shows the fitted parameters of the cumulative distribution for each year.

Null Model
The null model was created by shuffling the roll-call vote matrices for all years. The shuffling was performed by selecting a source node, creating a list with the indexes of all connected nodes (original targets, in this case all other nodes in the network) in a random order, and replacing each edge connecting with the original targets with the ones from the random list. This process is repeated for all nodes. Fig S2 shows the MST sub-network and MST-ordered correlation matrices after the shuffling process for the 53 th Legislature.