-
Notifications
You must be signed in to change notification settings - Fork 3
/
redata.proto
84 lines (73 loc) · 2.63 KB
/
redata.proto
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
79
80
81
82
83
84
syntax = "proto2";
option java_package = "org.bolson.redistricter";
option go_package = ".;data";
option optimize_for = LITE_RUNTIME;
// intpoints/fpoints, population, area, ubids and recnos should all have the same length.
message RedistricterData {
// only one of intpoints or fpoints should have any data in it.
repeated int32 intpoints = 1; // lon,lat pairs, microdegrees
repeated double fpoints = 2; // lon,lat pairs, degrees
repeated int32 population = 3;
repeated uint64 area = 4; // square meters
repeated uint64 ubids = 5; // universal block identifier (my internal number), decimal digits {state, county, tract, block}: SSCCCTTTTTTBBBB
repeated int32 recnos = 6; // LOGRECNO
repeated int32 edges = 7; // index,index pairs
// Default number of districts for this data set.
// Probably the number of US House districts.
optional int32 numDistricts = 8;
repeated group Other = 9 {
// name of this data
required string name = 10;
// odata should be the same length as point/area/ubids/recnos
// It was probably imported from Sf1 .uf1 files based on logrecno.
repeated int32 odata = 11;
}
// per-block place id (originally 5 digit non-zero decimal int)
repeated uint32 place = 12;
}
// For each block, a list of pixels (x,y coords) to draw.
message MapRasterization {
repeated group Block = 1 {
// Pick one of {ubid, recno, blockid}
// decimal digits {state, county, tract, block}: SSCCCTTTTTTBBBB
optional uint64 ubid = 2;
// "logical record number"
optional int32 recno = 6;
// String form preferred by TIGER data, concatenated state,county,tract,block
optional bytes blockid = 7;
// The pixels associated with this block. (x,y) pairs.
repeated int32 xy = 3;
// Pixels that should get 'water' treatment.
repeated int32 waterxy = 8;
}
optional int32 sizex = 4;
optional int32 sizey = 5;
}
message TableFileDescription {
// the name of the containing table file
required string name = 1;
repeated group Table = 2 {
// the name of the table (group of columns)
required string table = 3;
optional string tableDescription = 4;
repeated group Column = 5 {
// number of column within table file
required int32 column = 6;
// ['total','male','30-35'] or similar
repeated string path = 7;
}
}
}
message StatLogEntry {
required int32 generation = 1;
required double kmpp = 2;
required double averagePopulation = 3;
required double popStdDev = 4;
required int32 maxPop = 5;
required int32 minPop = 6;
required int32 medianPop = 7;
optional int32 noDistrictBlocks = 8;
optional int32 noDistrictPop = 9;
optional double kmppVariability = 10;
optional double spreadVariability = 11;
}