Skip to content

paretoman/searchingforparliament

Repository files navigation

Searching for Parliament

  1. Open a terminal or cmd to where you want to work.

  2. Download this project.

    git clone https://github.com/paretoman/searchingforparliament.git
    
  3. Install Gurobi (I only got it working with a Miniconda install of python2)

    conda config --add channels http://conda.anaconda.org/gurobi
    conda install gurobi
    
    • Request license
    • Go to your terminal and do the grbgetkey command that you got from that website. When it asks where to save the key, save it in the default location. ( there is also a quick start guide that has these steps. And for linux and mac)
    • You have to be physically on a campus for gurobi to work because it checks your ip. Or you can use something like sshuttle to forward all your traffic to the campus if you can log in.
  4. Install openstv (my custom version on github forked from old ). My custom version makes it so we don't have to write and read files to use openstv.

    git clone https://github.com/paretoman/openstv.git
    cd openstv
    python setup.py install
    
  5. Install R. Also, install the package "seriate". This can be as easy as "sudo yum install R". And then "sudo Rscript seriate.r". Also, there are a few standard python packages to install as well, like sci-kit learn.

  6. Start Python's webserver from the command line

make

or

python SimpleServer.py

or on windows

c:\Users\You\Miniconda2\python.exe SimpleServer.py
  1. Point your browser at http://localhost:8000

Also, there are some "fast load" files that will be created the first time the website runs the computation. If you need to recreate these files, just delete one of them, "vorder.txt". The other two are "rv.txt" and "voterCom.txt"

About

This is based on Emilien Dupont's facilityLocation project. It implements a search for the best combination of representatives for parliament.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published