-
Notifications
You must be signed in to change notification settings - Fork 3
/
data.txt
55 lines (39 loc) · 1.43 KB
/
data.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
STU = two letter postal code, upper case
stl = two letter postal code, lower case
# data for running solver
{STU}_runfiles.tar.gz
contains:
{STU}/{stl}.pb -- redistricting data
{STU}/{STU}.mppb -- map pixel protobuf file
{STU}/config/*.json -- e.g. Congress.json Assembly.json
# run config json
{
"args": [], // e.g. "-d2"
"kwargs": {}, // e.g. "-g":"150000"
}
# result submission JSON
{
"vars": {"config":"CA_Congress", ... },
"bestKmpp.dsz": "", // base64 encoded dsz district solution file
"binlog": "", // base64 encoded log
"statsum": "", // end summary text from statlog
}
# (old) internal submission tar as recorded on server
solution -- dsz district solution file
vars -- url encoded a=b&... values. {"config":"CA_Congress", ... }
binlog -- optional log
statlog.gz -- optional log
statsum -- end summary text from statlog
# .dsz solution format
uint32 file version == 4 // this establishes endianness; write native, read either. (This is a slightly terrible idea, sorry)
uint32 number of points
uint32 size of compressed data
byte-per-block, in order of blocks in census data, with a district assignment for each block. compressed by zlib compress().
# solution csv
block number is a 15 digit decimal number (fits in uint64), district is a decimal number:
SSCCCTTTTTTBBBB,d
SS = two digits of FIPS state id
CCC = two digit of FIPS county id
TTTTTT = six digits of Census Tract id
BBBB = four digits of Census Block id
d = district number