-
Open a terminal or cmd to where you want to work.
-
Download this project.
git clone https://github.com/paretoman/searchingforparliament.git
-
Install Gurobi (I only got it working with a Miniconda install of python2)
- Sign up for an account for free link
- Log in
- Download gurobi
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.
-
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
-
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.
-
Start Python's webserver from the command line
make
or
python SimpleServer.py
or on windows
c:\Users\You\Miniconda2\python.exe SimpleServer.py
- 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"