forked from Eesti-Malu-Instituut/we-aruanded
-
Notifications
You must be signed in to change notification settings - Fork 0
/
filters.json
executable file
·249 lines (249 loc) · 6.5 KB
/
filters.json
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
{
"sql": {
"select": [
"COUNT(DISTINCT k.persoon) records",
"YEAR(STR_TO_DATE(k.Sünd, '%Y-%m-%d')) year"
],
"from": ["memoriaal.kirjed k"],
"group_by": ["year"],
"order_by": ["year"]
},
"columns": {
"repressed": "Represseeritute arv"
},
"filters": {
"occurrences": {
"data": {
"header": "Toimumise järgi:",
"columns": {
"repressed": "Represseeritute arv",
"arrested": "Arreteeritud",
"deported": "Küüditatud"
}
},
"1941-arrests-deportations": {
"occurrence": 1941,
"type": "checkbox",
"label": "1941 arreteerimised / küüditamised",
"disabled": "true",
"visible": "true"
},
"1945-deportations": {
"occurrence": 1945,
"type": "checkbox",
"label": "1945 küüditamised",
"disabled": "true",
"visible": "true"
},
"1949-deportations": {
"occurrence": 1949,
"type": "checkbox",
"label": "1949 küüditamised",
"visible": "true",
"sql": {
"join": "LEFT JOIN memoriaal.49_kyyd_vab kv ON kv.persoon = k.persoon",
"where": {
"repressions": "kv.persoon IS NOT NULL"
}
},
"extra_sql": {
"arrested": "SELECT COUNT(DISTINCT k.persoon) records, YEAR(STR_TO_DATE(k.Sünd, '%Y-%m-%d')) year FROM memoriaal.kirjed k LEFT JOIN memoriaal.eraf_nimistu_vastetega env ON env.persoon = k.persoon WHERE env.persoon IS NOT NULL AND env.arreteeritud = 'Arreteeritud' GROUP BY year"
}
}
},
"arrests": {
"data": {
"header": "Arreteerimised kogu perioodi jooksul:",
"columns": {
"repressed": "Arreteeritute arv"
}
},
"all-arrests-during-period": {
"occurrence": 1949,
"type": "checkbox",
"label": "Arreteerimised",
"visible": "true",
"sql": {
"join": "LEFT JOIN memoriaal.eraf_nimistu_vastetega env ON env.persoon = k.persoon",
"where": {
"arrested": "env.persoon IS NOT NULL AND env.arreteeritud = 'Arreteeritud'"
}
}
}
},
"departure": {
"data": {
"header": "Riik, mille kaudu põgenenud:",
"columns": {
"repressed": "Isikute arv"
}
},
"fled-to-sweden": {
"occurrence": 1944,
"type": "checkbox",
"label": "Rootsi kaudu põgenenud",
"visible": "true",
"sql": {
"join": "LEFT JOIN memoriaal.kirmus4 k4 ON k4.persoon = k.persoon LEFT JOIN memoriaal.polisforhor p ON p.persoon = k.persoon",
"where": {
"fled": "(k4.persoon IS NOT NULL OR p.persoon IS NOT NULL)"
}
}
},
"fled-to-germany": {
"occurrence": 1944,
"type": "checkbox",
"label": "Saksamaa kaudu põgenenud",
"disabled": "false",
"visible": "true",
"sql": {
"join": "LEFT JOIN memoriaal.arolsen ar ON ar.persoon = k.persoon",
"where": {
"fled": "(ar.persoon IS NOT NULL AND ar.archival_unit_num LIKE '3%')"
}
}
},
"fled-to-finland": {
"type": "checkbox",
"label": "Soome kaudu põgenenud",
"disabled": "true",
"visible": "true"
}
},
"military-service": {
"data": {
"header": "Teenistuse järgi:",
"columns": {
"repressed": "Isikute arv"
}
},
"german-military-service": {
"occurrence": 1944,
"type": "checkbox",
"label": "Saksa sõjaväes teeninud",
"visible": "true",
"sql": {
"join": "LEFT JOIN memoriaal.R14_R16 r ON r.persoon = k.persoon",
"where": {
"military": "r.persoon IS NOT NULL"
}
}
},
"soviet-military-service": {
"type": "checkbox",
"label": "Punaarmees teeninud",
"disabled": "true",
"visible": "true"
}
},
"gender": {
"data": {
"header": "Sugu:",
"columns": {
"repressed": "Isikute arv"
}
},
"gender-male": {
"type": "checkbox",
"label": "Mees",
"visible": "true",
"sql": {
"select": "k.Sugu",
"where": "k.Sugu = \"M\""
}
},
"gender-female": {
"type": "checkbox",
"label": "Naine",
"visible": "true",
"sql": {
"select": "k.Sugu",
"where": "k.Sugu = \"N\""
}
}
},
"education": {
"data": {
"header": "Tartu ülikoolis õppinud:",
"columns": {
"repressed": "Isikute arv"
}
},
"has-studied-at-university": {
"type": "checkbox",
"label": "Jah",
"visible": "true",
"sql": {
"join": "LEFT JOIN memoriaal.album_academicum aa ON aa.persoon = k.persoon",
"where": "aa.persoon IS NOT NULL"
}
}
},
"text-input-1": {
"data": {
"header": "Sünniaja järgi:",
"columns": {
"repressed": "Isikute arv"
}
},
"date-of-birth-from-to": {
"type": "input",
"placeholder": "Alates aasta",
"visible": "true",
"sql": {
"where": "YEAR(STR_TO_DATE(k.Sünd, \"%Y-%m-%d\")) >= {{value}}"
}
}
},
"text-input-2": {
"data": {
"header": "Sünnikoha järgi:",
"columns": {
"repressed": "Isikute arv"
}
},
"birthplace-input": {
"type": "input",
"placeholder": "",
"visible": "true",
"sql": {
"select": "k.Sünnikoht",
"where": "k.Sünnikoht LIKE \"%{{value}}%\""
}
}
},
"text-input-3": {
"data": {
"header": "Surmaaja järgi:",
"columns": {
"repressed": "Isikute arv"
}
},
"date-of-death-from-to": {
"type": "input",
"placeholder": "Kuni aasta",
"visible": "true",
"sql": {
"where": "YEAR(STR_TO_DATE(k.Surm, \"%Y-%m-%d\")) <= {{value}}"
}
}
},
"text-input-4": {
"data": {
"header": "Surmakoha järgi:",
"columns": {
"repressed": "Isikute arv"
}
},
"deathplace-input": {
"type": "input",
"placeholder": "",
"visible": "true",
"sql": {
"select": "k.Surmakoht",
"where": "k.Surmakoht LIKE \"%{{value}}%\""
}
}
}
}
}