-
Notifications
You must be signed in to change notification settings - Fork 2
/
data_files.proto
119 lines (94 loc) · 2.13 KB
/
data_files.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
syntax = "proto3";
// articles
message StatisticRow {
float statval = 1;
repeated int32 ordinal_by_universe = 2;
repeated int32 overall_ordinal_by_universe = 3;
repeated float percentile_by_population_by_universe = 4;
}
message RelatedButton {
string longname = 1;
string shortname = 2;
string row_type = 3;
}
message RelatedButtons {
string relationship_type = 1;
repeated RelatedButton buttons = 2;
}
message Histogram {
float bin_min = 1;
float bin_size = 2;
// the counts are normalized to sum to 2**16
repeated int32 counts = 3;
}
message ExtraStatistic {
optional Histogram histogram = 1;
}
message Article {
string shortname = 1;
string longname = 2;
string source = 3;
string article_type = 4;
repeated StatisticRow rows = 5;
repeated RelatedButtons related = 6;
repeated string universes = 7;
repeated ExtraStatistic extra_stats = 8;
}
// geojson
message Coordinate {
float lon = 1;
float lat = 2;
}
message Ring {
repeated Coordinate coords = 1;
}
message Polygon {
repeated Ring rings = 1;
}
message MultiPolygon {
repeated Polygon polygons = 1;
}
message Feature {
oneof geometry {
Polygon polygon = 1;
MultiPolygon multipolygon = 2;
}
repeated int32 zones = 3;
float center_lon = 4;
}
// string lists
message StringList {
repeated string elements = 1;
}
message SearchIndex {
repeated string elements = 1;
repeated uint32 priorities = 2;
}
message OrderList {
repeated int32 order_idxs = 1;
}
message DataList {
repeated float value = 1;
repeated float population_percentile = 2;
}
message OrderLists {
repeated string statnames = 1;
repeated OrderList order_lists = 2;
}
message DataLists {
repeated string statnames = 1;
repeated DataList data_lists = 2;
}
// unified result
message AllStats {
repeated float stats = 1;
}
message ConsolidatedShapes {
repeated string longnames = 1;
repeated Feature shapes = 2;
}
message ConsolidatedStatistics {
repeated string longnames = 1;
repeated string shortnames = 2;
repeated AllStats stats = 3;
}