forked from Vizzuality/kenya-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdb.json
More file actions
460 lines (460 loc) · 14.7 KB
/
db.json
File metadata and controls
460 lines (460 loc) · 14.7 KB
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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
{
"indicators": [
{
"id": 1,
"name": "Indicator1",
"query": "",
"slug": "indicator-1",
"topic": "wildlife",
"source": "S.R",
"updatedAt": "date",
"widgets": [
{
"id": "w1-1",
"title":"w1-1",
"description": "description",
"slug": "w1-1",
"topic": "wildlife",
"default": true,
"widget_type": "map",
"frequency": "years",
"granularity": 5,
"indicator_id": 1,
"thumbnail": "",
"json_config": {
"threshold": {
"fail": 0,
"medium": 100,
"success": 250
},
"config": {
"id": "9d295f2e-7626-4ed2-9e77-1e13356eaef7",
"type": "layer",
"attributes": {
"slug": "natural-resource-protection-and-child-health-indicators-2015-release-2010-2015-ciesin",
"userId": "58333dcfd9f39b189ca44c75",
"application": [
"rw"
],
"name": "Natural Resource Protection and Child Health Indicators, 2015 Release (2010 – 2015) (CIESIN)",
"default": true,
"indicator": 1,
"provider": "cartodb",
"iso": [],
"description": null,
"layerConfig": {
"account": "wri-rw",
"body": {
"maxzoom": 18,
"minzoom": 3,
"layers": [
{
"type": "cartodb",
"options": {
"sql": "with a as (SELECT cartodb_id, the_geom, the_geom_webmercator, iso3, countryname, unnest(array[ 'nrpi_v2015_15', 'chi_v2015_15']) AS \"indicator\", unnest(array[ nrpi_v2015_15, chi_v2015_15]) AS \"value\" FROM \"wri-rw\".nrpi_chi_2015 where countryname != '' order by indicator, countryname asc) select cartodb_id, the_geom, the_geom_webmercator, iso3, countryname, avg(value) as value from a group by countryname, cartodb_id, the_geom, the_geom_webmercator, iso3 order by countryname",
"cartocss": "#layer { polygon-fill: ramp([value], (#64d1ed, #64d1ed, #59bad4, #37a3bf, #308da5), quantiles); line-width: 1; line-color: #FFF; line-opacity: 0.5; polygon-comp-op: src-over;}",
"cartocss_version": "2.3.0"
}
}
]
}
},
"legendConfig": {
"type": "choropleth",
"items": [
{
"value": "0-49",
"color": "#c3f1fc"
},
{
"value": "49-66",
"color": "#64d1ed"
},
{
"value": "66-80",
"color": "#59bad4"
},
{
"value": "80-92",
"color": "#37a3bf"
},
{
"value": "92-100",
"color": "#308da5"
}
]
},
"applicationConfig": {},
"staticImageConfig": {}
}
}
}
},
{
"id": "w1-2",
"slug": "w1-2",
"type": "",
"topic": "wildlife",
"default": false,
"thumbnail": "",
"widgetConfig": {}
}
]
},
{
"id": 2,
"name": "Indicator2",
"query": "",
"slug": "indicator-2",
"topic": "wildlife",
"source": "S.R",
"updatedAt": "date",
"widgets": [
{
"id": "w2-2",
"title":"w2-2",
"description": "description",
"slug": "w2-2",
"default": true,
"topic": "wildlife",
"widget_type": "map",
"frequency": "years",
"granularity": 5,
"indicator_id": 2,
"thumbnail": "",
"json_config": {
"threshold": {
"fail": 0,
"medium": 100,
"success": 250
},
"config": {
"id": "dabcca67-037c-4d11-afc4-69559edec4dc",
"type": "layer",
"attributes": {
"slug": "marine-and-terrestrial-protected-areas",
"userId": "58333dcfd9f39b189ca44c75",
"application": [
"rw"
],
"name": "Marine and Terrestrial Protected Areas",
"default": true,
"indicator": 2,
"provider": "cartodb",
"iso": [
"global"
],
"description": "Protected Planet, UNEP",
"layerConfig": {
"account": "wri-01",
"body": {
"maxzoom": 18,
"minzoom": 3,
"layers": [
{
"type": "cartodb",
"options": {
"sql": "SELECT * FROM wdpa_protected_areas",
"cartocss": "#wdpa_protected_areas { polygon-opacity: 0.7; line-color: #FFF; line-width: 0.5; line-opacity: 1;}#wdpa_protected_areas[iucn_cat='II'] { polygon-fill: #0f3b82;}#wdpa_protected_areas[iucn_cat='III'] { polygon-fill: #c9ddff;}#wdpa_protected_areas[iucn_cat='IV'] { polygon-fill: #b9b2a1;}#wdpa_protected_areas[iucn_cat='Ia'] { polygon-fill: #5ca2d1;}#wdpa_protected_areas[iucn_cat='Ib'] { polygon-fill: #3e7bb6;}#wdpa_protected_areas[iucn_cat='Not Applicable'] { polygon-fill: #eed54c;}#wdpa_protected_areas[iucn_cat='Not Assigned'] { polygon-fill: #e7ab36;}#wdpa_protected_areas[iucn_cat='Not Reported'] { polygon-fill: #fa894b;}#wdpa_protected_areas[iucn_cat='V'] { polygon-fill: #ae847e;}#wdpa_protected_areas[iucn_cat='VI'] { polygon-fill: #daa89b;}",
"cartocss_version": "2.3.0"
}
}
]
}
},
"legendConfig": {
"type": "basic",
"items": [
{
"name": "Ia - Strict Nature Reserve",
"color": "#5ca2d1"
},
{
"name": "Ib - Wildnerness Area",
"color": "#3e7bb6"
},
{
"name": "II - National Park",
"color": "#0f3b82"
},
{
"name": "III - National Monument or Feature",
"color": "#c9ddff"
},
{
"name": "IV - Habitat and Species Management Area",
"color": "#b9b2a1"
},
{
"name": "V - Protected Landscape or Seascape",
"color": "#ae847e"
},
{
"name": "VI - Protected Area with Sustainable Use of Natural Resources",
"color": "#daa89b"
},
{
"name": "Not applicable",
"color": "#eed54c"
},
{
"name": "Not assigned",
"color": "#e7ab36"
},
{
"name": "Not reported",
"color": "#fa894b"
}
]
},
"applicationConfig": {},
"staticImageConfig": {}
}
}
}
},
{
"id": "w2-1",
"slug": "w2-1",
"type": "bars",
"topic": "wildlife",
"default": false,
"thumbnail": "",
"widgetConfig": {}
}
]
},
{
"id": 3,
"name": "Indicator3",
"query": "",
"slug": "indicator-3",
"topic": "wildlife",
"source": "S.R",
"updatedAt": "date",
"widgets": [
{
"id": "w2-2",
"title":"w2-2",
"description": "description",
"slug": "w2-2",
"default": true,
"topic": "wildlife",
"widget_type": "map",
"frequency": "years",
"granularity": 5,
"indicator_id": 2,
"thumbnail": "",
"json_config": {
"threshold": {
"fail": 0,
"medium": 100,
"success": 250
},
"config": {
"id": "8cee7211-d495-4217-8f9a-f6f903c3cef1",
"type": "layer",
"attributes": {
"slug": "open-air-quality-pm2-5",
"userId": "58333dcfd9f39b189ca44c75",
"application": [
"rw"
],
"name": "Open Air Quality: PM2.5.",
"default": true,
"indicator": 3,
"provider": "cartodb",
"iso": [
"global"
],
"description": "",
"layerConfig": {
"account": "wri-rw",
"body": {
"maxzoom": 18,
"minzoom": 3,
"layers": [
{
"type": "mapnik",
"options": {
"sql": "SELECT * FROM pm2_5_pm10_no2_so2_o3_co_bc_openaq where parameter='pm25'",
"cartocss": "#layer { marker-width: 7; marker-fill: ramp([value], (#f3cbd3, #eaa9bd, #dd88ac, #ca699d, #b14d8e, #91357d, #6c2167), quantiles); marker-fill-opacity: 1; marker-allow-overlap: true; marker-line-width: 1; marker-line-color: #FFF; marker-line-opacity: 1;}",
"cartocss_version": "2.3.0"
}
}
]
}
},
"legendConfig": {
"type": "gradient",
"items": [
{
"value": "-1111 µg/m³",
"color": "#f3cbd3"
},
{
"value": "",
"color": "#eaa9bd"
},
{
"value": "",
"color": "#dd88ac"
},
{
"value": "",
"color": "#b14d8e"
},
{
"value": "",
"color": "#91357d"
},
{
"value": "985 µg/m³",
"color": "#6c2167"
}
]
},
"applicationConfig": {},
"staticImageConfig": {
"format": "png",
"bbox": [
-110,
-65,
110,
65
],
"width": 2048,
"height": 1024,
"srs": null,
"urlTemplate": "https://{{account}}.carto.com/api/v1/map/static/bbox/{{token_groupid}}/{{bbox}}/{{width}}/{{height}}.{{format}}"
}
}
}
}
},
{
"id": "w2-1",
"slug": "w2-1",
"type": "",
"topic": "wildlife",
"default": false,
"thumbnail": "",
"widgetConfig": {}
}
]
},
{
"id": 4,
"name": "Indicator4",
"query": "",
"slug": "indicator-4",
"topic": "wildlife",
"source": "S.R",
"updatedAt": "date",
"widgets": [
{
"id": "w4-4",
"title":"w4-4",
"description": "description",
"slug": "w4-4",
"topic": "wildlife",
"default": true,
"widget_type": "arc",
"frequency": "years",
"granularity": 5,
"indicator_id": 1,
"thumbnail": "",
"json_config": {
"threshold": {
"fail": 0,
"medium": 100,
"success": 250
}
}
}
]
},
{
"id": 5,
"name": "Indicator5",
"query": "",
"slug": "indicator-5",
"topic": "wildlife",
"source": "S.R",
"updatedAt": "date",
"widgets": [
{
"id": "w5-5",
"title":"w5-5",
"description": "description",
"slug": "w5-5",
"topic": "wildlife",
"default": true,
"widget_type": "arc",
"frequency": "years",
"granularity": 5,
"indicator_id": 1,
"thumbnail": "",
"json_config": {
"threshold": {
"fail": 0,
"medium": 100,
"success": 250
}
}
}
]
}
],
"filter": {
"areas": [
{ "id": "kenya", "name": "Kenya" },
{
"id": "counties",
"name": "Counties",
"list": [
{ "id": "baringo", "name": "Baringo" },
{ "id": "bomet", "name": "Bomet" },
{ "id": "bungoma", "name": "Bungoma" },
{ "id": "busia", "name": "Busia" },
{ "id": "elgeyo", "name": "Elgeyo" }
]
},
{
"id": "protected-areas",
"name": "Protected Areas",
"list": [
{ "id": "protected_area_1", "name": "Protected Area 1" },
{ "id": "protected_area_2", "name": "Protected Area 2" }
]
}
],
"categories": [
{ "id": "wildlife", "name": "Wildlife" },
{ "id": "topic1", "name": "topic1" },
{ "id": "topic2", "name": "topic2" },
{ "id": "topic3", "name": "topic3" }
],
"sort": [
{ "id": "name", "name": "Name" },
{ "id": "county", "name": "County" },
{ "id": "topic", "name": "Category" },
{ "id": "date", "name": "Date" }
]
},
"indicators-groups": {
"climate": [
{ "id": 1, "name": "Indicator1" }
],
"land cover": [
{ "id": 2, "name": "Indicator2" },
{ "id": 5, "name": "Indicator5" }
],
"wild life": [
{ "id": 3, "name": "Indicator3" }
],
"life stock": [
{ "id": 4, "name": "Indicator4" }
]
}
}