-
Notifications
You must be signed in to change notification settings - Fork 3
/
README.txt
78 lines (50 loc) · 2.16 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
This is Open Source software to create impartial optimally compact district maps for US State Legislatures and Congressional districts.
Results can be seen here:
http://bdistricting.com/2010/
And with analysis of partisan outcomes models here:
https://projects.fivethirtyeight.com/redistricting-maps/#algorithmic-compact
DEPENDENCIES:
C++ compiler (GCC or CLANG)
Java 1.8+
Python 3.6+
Go 1.16+
png library
zlib compression library
google protocol buffers http://code.google.com/p/protobuf/
BUILDING:
There's no ./configure because autoconf is hard. :-(
Instead, Makefile includes makeopts/`uname`.pre early on to set variables. See the Darwin and Linux examples.
So, if you're lucky, all you have to do is:
make all
There is no `make install` because this is a tool for an experimenter. The binaries just live here where they're compiled.
If you want to leave makeopts/* alone, create a file localvars.make which gets included after that and before anything else. A good place to put your own settings.
RUNNING:
Setup a python environment:
# your Python version may vary, run `python3 --version` to check
python3 -m venv ve
# this assumes bash or sh-like shell, to source a script into your session
. ve/bin/activate
pip install -r python/requirements.txt
(cd python && pip install -e .)
Make a directory, which I traditionally call "data", to hold the Census data, and fetch a state of data into it, run preprocessing:
mkdir data
./bin/setupstatedata --data=data CT
Run from local data:
(cd runner && make)
runner/runner -data data -http :8080
The -http argument is optional, but runs a handy HTTP server on that port (e.g. http://localhost:8080/ ) which nicely displays status and results.
Lots of other options are available on both ./setupstatedata and runner/runner and there is --help available for them.
---
* Setting up protobuf
# Here's the cheat sheet for building this quickly.
./configure
# then build C and optionally python
make
make check
sudo make install
# while Python virtual environment setup above is active:
cd ../python
python setup.py test
python setup.py install
DEVELOPMENT:
data.txt description of files and data bundles involved in running the system