This is the data and code necessary to replicate the results in the paper “Disconnect between the Public Face and the Voting Behavior of Political Representatives“.
We provide both the python script to generate the main results, as well as some Gnuplot scripts to generate the figures.
All results were generated using Python 3.13.7 and Gnuplot Version 6.0 patchlevel 2. You’re going to need the following python libraries:
- numpy
- scipy
- sklearn
- pandas
- torch
- torch_geometric
- networkx
- umap
Simply run the scripts in their numerical order — scripts require the input from previous scripts, so running them out of order guarantees that errors will be thrown. Note that script 03a generates its own o3b gnuplot script, so if you want to generate that figure you will have to run that additional script. The scripts do not take any parameter, so simply run them as “python script.py” or “gnuplot script.gp”. Since some methods use randomness, we fixed a given seed for reproducibility: if you do not change the seed number you should get the exact same figures as for the paper (assuming you’re using the same library versions as we did).