GeoShapes
Geoshape typed fields are fields constructed from GeoJSON data, which is an open standard format designed for representing simple geographical features. It is based on the JSON format. Another sub-type of GeoJSON accepted by Mona is TopoJSON, which is an extension of GeoJSON that typically provides smaller file sizes.
In Mona, the Geoshape fields are used to create maps on the investigations page. This can include maps for states, countries, cities, regions, and more.
For example, a map of states in the US to show the average values of different metrics in a more visible way.
Also, with use our internal ETL functions Geoshape fields can be used to create more fields derived from them.
Setup GeoJSON maps
In order to set up the GeoJSON map, users need to export the Geoshape fields containing the relevant data points to a helper, potentially invisible, context class, and then call for these fields when looking at the relevant dimension.
For example, let's say we want to add a map of states in the US to show when we are segmenting the data according to states. In this case, we will first configure the helper context "STATES" as follows:
{
"STATES": {
"visible": false,
"fields": {
"boundaries": {
"type": "geoshape"
}
}
}
}
Once the context class is configured we can export the GeoJSON, in the following way:
import requests
import json
url = "https://incoming[MY_USER_ID].monalabs.io/export"
payload = json.dumps({
"messages": [
{
"arcClass": "STATES",
"contextId": "California",
"message": {
"MONA_ARC_CLASS": "STATES",
"boundaries": {
"type": "Topology",
"objects": {
"data": {
"geometries": [
{
"type": "MultiPolygon",
"properties": {
"name": "US-CA"
},
"arcs": [
[
[
0
]
],
[
[
1
]
],
[
[
2
]
],
[
[
3
]
],
[
[
4
]
],
[
[
5
]
],
[
[
6
]
],
[
[
7
]
],
[
[
8
]
],
[
[
9
]
],
[
[
10
]
]
]
}
],
"type": "GeometryCollection"
}
},
"bbox": [
-124.409591,
32.534156,
-114.131489,
42.009518
],
"transform": {
"scale": [
0.000010278112278112282,
0.000009475371475371473
],
"translate": [
-124.409591,
32.534156
]
},
"arcs": [
[
[
404851,
154630
],
[
106,
272
],
[
850,
600
],
[
843,
268
],
[
847,
25
],
[
1247,
-498
],
[
1235,
-144
],
[
2770,
415
],
[
1522,
1045
],
[
391,
708
],
[
709,
121
],
[
439,
12
],
[
2023,
-657
],
[
2420,
-6
],
[
1613,
493
],
[
1053,
705
],
[
81,
297
],
[
420,
355
],
[
246,
41
],
[
1152,
-203
],
[
-72,
-1159
],
[
-369,
-379
],
[
-252,
-834
],
[
142,
-362
],
[
229,
-1044
],
[
512,
-580
],
[
1523,
-945
],
[
1414,
-597
],
[
711,
-37
],
[
1897,
464
],
[
530,
-91
],
[
-101,
-1420
],
[
297,
-1365
],
[
556,
-664
],
[
86,
-638
],
[
-334,
-198
],
[
-2653,
-98
],
[
-1630,
-547
],
[
-2838,
-1770
],
[
-139,
-208
],
[
-29,
-195
],
[
-104,
-128
],
[
-2735,
-599
],
[
-2025,
-109
],
[
-670,
-378
],
[
-355,
-543
],
[
-1234,
-361
],
[
-4588,
2467
],
[
-980,
940
],
[
-1050,
2080
],
[
-243,
271
],
[
-609,
205
],
[
-145,
495
],
[
-903,
1633
],
[
-1468,
1761
],
[
-2338,
1084
]
],
[
[
449479,
160743
],
[
1855,
-233
],
[
452,
34
],
[
233,
188
],
[
795,
-46
],
[
1561,
-783
],
[
1268,
-147
],
[
1349,
-490
],
[
773,
-589
],
[
1763,
-1886
],
[
4745,
-700
],
[
1790,
347
],
[
692,
506
],
[
773,
1087
],
[
-439,
389
],
[
-43,
222
],
[
1557,
1296
],
[
1929,
51
],
[
653,
353
],
[
3609,
-1298
],
[
872,
-728
],
[
-110,
-212
],
[
-1035,
-771
],
[
-626,
-101
],
[
-351,
-307
],
[
-567,
-1188
],
[
118,
-459
],
[
-720,
-808
],
[
-583,
-241
],
[
-1477,
50
],
[
-1417,
-664
],
[
-649,
-117
],
[
-2161,
-145
],
[
-198,
185
],
[
-2587,
-127
],
[
-1471,
-200
],
[
-2654,
-1442
],
[
-1639,
-321
],
[
-526,
-397
],
[
-227,
-420
],
[
-634,
-196
],
[
-2117,
453
],
[
-727,
-12
],
[
-749,
-480
],
[
-3678,
392
],
[
-4554,
782
],
[
-2978,
1059
],
[
-360,
568
],
[
-581,
1588
],
[
-182,
846
],
[
230,
301
],
[
547,
1251
],
[
57,
904
],
[
-1605,
1418
],
[
-2276,
1354
],
[
-693,
1162
],
[
407,
835
],
[
613,
24
],
[
2114,
-491
],
[
3291,
-164
],
[
3059,
-1214
],
[
693,
-717
],
[
1062,
-92
],
[
1754,
541
]
],
[
[
384021,
159199
],
[
2173,
-602
],
[
2090,
1601
],
[
338,
303
],
[
387,
-221
],
[
749,
-256
],
[
723,
-27
],
[
513,
191
],
[
1625,
1125
],
[
525,
541
],
[
22,
362
],
[
-155,
390
],
[
185,
164
],
[
586,
-359
],
[
708,
-1457
],
[
-517,
-363
],
[
164,
-589
],
[
1135,
-386
],
[
1535,
266
],
[
1180,
-751
],
[
570,
-570
],
[
1076,
-1373
],
[
-236,
-253
],
[
-1217,
-247
],
[
-2982,
135
],
[
-741,
-232
],
[
-254,
-304
],
[
-1675,
395
],
[
-3330,
1416
],
[
-570,
5
],
[
-369,
-347
],
[
-816,
-372
],
[
-2600,
280
],
[
-535,
365
],
[
-554,
729
],
[
267,
441
]
],
[
[
473409,
78749
],
[
1060,
464
],
[
467,
21
],
[
2248,
-1277
],
[
2166,
-934
],
[
1660,
-500
],
[
705,
-483
],
[
2813,
-2796
],
[
-1431,
-948
],
[
-1991,
-396
],
[
-1099,
9
],
[
-2399,
533
],
[
-1068,
259
],
[
-570,
392
],
[
-2759,
704
],
[
-1858,
1481
],
[
-65,
273
],
[
-36,
275
],
[
-451,
538
],
[
-807,
2205
],
[
1644,
-791
],
[
662,
242
],
[
739,
729
],
[
370,
0
]
],
[
[
485169,
155161
],
[
-449,
220
],
[
-987,
375
],
[
-330,
256
],
[
-10,
174
],
[
711,
200
],
[
1220,
-101
],
[
979,
-740
],
[
1466,
-220
],
[
609,
19
],
[
2276,
1128
],
[
888,
-92
],
[
-1842,
-566
],
[
-1474,
-849
],
[
-2236,
262
],
[
-821,
-66
]
],
[
[
572582,
38134
],
[
-1099,
1139
],
[
-1490,
4103
],
[
-948,
1344
],
[
-1230,
1191
],
[
-1304,
4127
],
[
-886,
746
],
[
-1024,
-70
],
[
100,
1721
],
[
1119,
523
],
[
1836,
-210
],
[
598,
-508
],
[
444,
-447
],
[
-8,
-662
],
[
522,
-1303
],
[
1858,
-2677
],
[
1055,
-1056
],
[
3154,
-3913
],
[
1121,
-1087
],
[
608,
-336
],
[
1792,
-1145
],
[
1347,
-1487
],
[
7471,
-5926
],
[
1604,
-1827
],
[
-296,
-491
],
[
-388,
276
],
[
-1891,
488
],
[
-721,
82
],
[
-699,
-142
],
[
-652,
-384
],
[
-2371,
-2084
],
[
-369,
510
],
[
103,
153
],
[
-1611,
1448
],
[
-3031,
2233
],
[
-1151,
299
],
[
-816,
737
],
[
-1032,
1787
],
[
-116,
297
],
[
88,
522
],
[
-1698,
1785
],
[
11,
244
]
],
[
[
574948,
96612
],
[
53,
-181
],
[
1371,
-175
],
[
771,
230
],
[
3098,
-2057
],
[
2163,
-174
],
[
4042,
-1834
],
[
1139,
-63
],
[
197,
-229
],
[
312,
-1978
],
[
3954,
-4178
],
[
815,
-618
],
[
571,
-753
],
[
685,
-1639
],
[
-186,
-1049
],
[
-1139,
-969
],
[
-823,
-218
],
[
-1752,
650
],
[
-1662,
1066
],
[
-1404,
499
],
[
-2741,
89
],
[
-3610,
-239
],
[
-1583,
336
],
[
-881,
447
],
[
-1607,
1906
],
[
-670,
1322
],
[
600,
1400
],
[
403,
1732
],
[
-631,
2724
],
[
-370,
812
],
[
-1479,
465
],
[
-1164,
-192
],
[
-34,
281
],
[
-678,
597
],
[
-1376,
409
],
[
-2076,
-126
],
[
-460,
102
],
[
-728,
524
],
[
-484,
941
],
[
-1758,
1998
],
[
-702,
280
],
[
-277,
706
],
[
64,
165
],
[
447,
-17
],
[
1249,
-435
],
[
4029,
32
],
[
1345,
-639
],
[
2967,
-1950
]
],
[
[
193702,
561304
],
[
-1528,
-30
],
[
-866,
318
],
[
-293,
591
],
[
754,
772
],
[
740,
409
],
[
927,
-240
],
[
9,
-2
],
[
279,
-864
],
[
0,
-954
],
[
-22,
0
]
],
[
[
135791,
545224
],
[
2,
435
],
[
166,
240
],
[
749,
-52
],
[
418,
-351
],
[
292,
-530
],
[
-339,
-814
],
[
-473,
-85
],
[
-576,
265
],
[
-277,
454
],
[
38,
438
]
],
[
[
197613,
558537
],
[
61,
438
],
[
772,
157
],
[
652,
-864
],
[
434,
-1021
],
[
-378,
-707
],
[
-949,
393
],
[
-25,
550
],
[
-567,
1054
]
],
[
[
33476,
942505
],
[
-52,
582
],
[
-959,
3325
],
[
-537,
999
],
[
-54,
3856
],
[
-1014,
617
],
[
-848,
1644
],
[
-27,
985
],
[
391,
710
],
[
-348,
1821
],
[
-1309,
1505
],
[
-158,
1275
],
[
-407,
1215
],
[
-1492,
1789
],
[
-370,
1514
],
[
96,
763
],
[
-497,
3208
],
[
-383,
915
],
[
-664,
1145
],
[
-1019,
1195
],
[
-1233,
594
],
[
-776,
-676
],
[
-552,
-345
],
[
-381,
74
],
[
-865,
1082
],
[
-3491,
2508
],
[
-249,
131
],
[
-625,
-61
],
[
-709,
1220
],
[
1067,
980
],
[
1396,
2784
],
[
1079,
2928
],
[
1085,
4408
],
[
490,
5569
],
[
-150,
4483
],
[
-648,
1585
],
[
10769,
-159
],
[
68,
-12
],
[
1206,
5
],
[
113,
-2
],
[
25802,
-147
],
[
19158,
460
],
[
10360,
64
],
[
1565,
9
],
[
301,
-5
],
[
7,
5
],
[
14717,
-150
],
[
11364,
500
],
[
7380,
443
],
[
10669,
-527
],
[
4291,
-5
],
[
35650,
196
],
[
12999,
380
],
[
11961,
112
],
[
8626,
-185
],
[
1,
0
],
[
12473,
-14
],
[
86,
0
],
[
367,
-26
],
[
123,
5
],
[
15011,
-361
],
[
28500,
-337
],
[
306,
-6
],
[
1546,
-19
],
[
1344,
-24
],
[
9192,
-178
],
[
5898,
-72
],
[
7074,
-86
],
[
772,
-10
],
[
450,
-6
],
[
5729,
1
],
[
1542,
-37
],
[
1920,
-48
],
[
465,
31
],
[
131,
14
],
[
17517,
-31
],
[
11593,
-320
],
[
15150,
48
],
[
18052,
-11
],
[
167,
0
],
[
35631,
-58
],
[
3851,
-7
],
[
27948,
156
],
[
-68,
-85544
],
[
50,
-32809
],
[
12,
-596
],
[
0,
-164
],
[
322,
-38626
],
[
-23,
-18792
],
[
0,
-62
],
[
-2,
-6092
],
[
0,
-113
],
[
-92,
-14363
],
[
-11,
-3670
],
[
6,
-1514
],
[
-11,
-574
],
[
-323,
-30714
],
[
10,
-87
],
[
-79,
-6072
],
[
-175,
-29266
],
[
0,
-7
],
[
-214,
-13569
],
[
0,
-13
],
[
-9,
-264
],
[
0,
-53
],
[
-32,
-8937
],
[
-1,
-365
],
[
121,
-6291
],
[
107,
-5584
],
[
92,
-4770
],
[
141,
-7168
],
[
9408,
-6992
],
[
30807,
-23069
],
[
59,
-41
],
[
159,
-119
],
[
8878,
-6687
],
[
16,
-13
],
[
4224,
-3142
],
[
-2,
1
],
[
11883,
-9005
],
[
16699,
-12654
],
[
3004,
-2277
],
[
36912,
-28309
],
[
30941,
-24201
],
[
37826,
-29586
],
[
-4,
-3
],
[
20151,
-15864
],
[
32284,
-25819
],
[
32567,
-26323
],
[
16082,
-12999
],
[
49879,
-41011
],
[
38043,
-31741
],
[
352,
-268
],
[
17585,
-14822
],
[
1935,
-1625
],
[
4562,
-3838
],
[
15254,
-12833
],
[
4016,
-3416
],
[
33,
-29
],
[
47,
-38
],
[
23460,
-20092
],
[
150,
-107
],
[
1025,
-872
],
[
240,
-218
],
[
260,
-222
],
[
8282,
-7067
],
[
3152,
-2696
],
[
4482,
-3879
],
[
6293,
-5445
],
[
51,
-20
],
[
1292,
-1104
],
[
95,
-51
],
[
21437,
-18588
],
[
10,
-1
],
[
11709,
-10212
],
[
76,
-62
],
[
16661,
-14523
],
[
372,
-1076
],
[
17,
-606
],
[
-182,
-8325
],
[
-568,
-1916
],
[
150,
-1489
],
[
207,
-531
],
[
7819,
-10880
],
[
8472,
-7875
],
[
1271,
-4091
],
[
10986,
-21325
],
[
7328,
-5288
],
[
6308,
-4216
],
[
2196,
-1274
],
[
3758,
-4863
],
[
661,
-4521
],
[
-173,
-203
],
[
-3036,
-717
],
[
-5973,
-5266
],
[
-1783,
-2338
],
[
-6655,
-3711
],
[
-878,
-672
],
[
-4369,
-2060
],
[
-2340,
-896
],
[
-1049,
166
],
[
-1005,
-171
],
[
-858,
-693
],
[
-1253,
-1589
],
[
-200,
-916
],
[
47,
-4427
],
[
-323,
-1601
],
[
-2465,
-3080
],
[
-3530,
-3339
],
[
-1804,
-4672
],
[
-692,
-8328
],
[
212,
-3429
],
[
1851,
-5249
],
[
987,
-5115
],
[
-223,
-1163
],
[
-2202,
-889
],
[
-471,
-274
],
[
-622,
-700
],
[
-999,
-9270
],
[
31,
-1139
],
[
422,
-1210
],
[
29,
-38
],
[
-2260,
-3902
],
[
-3468,
-3879
],
[
-2761,
-4063
],
[
-409,
-2428
],
[
-3713,
-1921
],
[
-5444,
-1947
],
[
2056,
-5896
],
[
2726,
-8711
],
[
-318,
-7705
],
[
-390,
-2741
],
[
-750,
-1828
],
[
-949,
-1160
],
[
-910,
-2731
],
[
-160,
-1502
],
[
3183,
-4598
],
[
4985,
-1985
],
[
1711,
-319
],
[
1606,
56
],
[
488,
211
],
[
630,
754
],
[
646,
132
],
[
4677,
-598
],
[
649,
-431
],
[
541,
-361
],
[
4159,
-5467
],
[
556,
-6950
],
[
-275,
-2784
],
[
0,
-24
],
[
-2974,
-6001
],
[
-53,
-22
],
[
-11569,
-9783
],
[
14,
-103
],
[
-4152,
565
],
[
-56,
3
],
[
-1776,
252
],
[
-150,
42
],
[
-3989,
-1884
],
[
-72536,
-5453
],
[
-39956,
-3237
],
[
-22409,
-1910
],
[
-27625,
-2354
],
[
-70905,
-6476
],
[
-584,
-53
],
[
-827,
4377
],
[
39,
2261
],
[
-360,
2290
],
[
-272,
876
],
[
-1985,
3546
],
[
-876,
1193
],
[
-1119,
1023
],
[
-1226,
644
],
[
-370,
116
],
[
-1586,
-116
],
[
-1050,
-496
],
[
-1204,
-1235
],
[
-956,
-211
],
[
-886,
3240
],
[
-233,
2744
],
[
214,
2047
],
[
272,
792
],
[
-233,
3588
],
[
-594,
1710
],
[
-1936,
2015
],
[
-117,
1826
],
[
98,
369
],
[
710,
887
],
[
866,
-264
],
[
418,
391
],
[
438,
717
],
[
438,
1573
],
[
-273,
2722
],
[
-583,
3282
],
[
-203,
876
],
[
-1773,
7683
],
[
-1225,
2354
],
[
-1596,
4210
],
[
-536,
2002
],
[
-1273,
2990
],
[
-3028,
4474
],
[
-300,
444
],
[
-2813,
3623
],
[
-1016,
1143
],
[
-4248,
5796
],
[
-2355,
2945
],
[
-3489,
3973
],
[
-4091,
3316
],
[
-2337,
1425
],
[
-2351,
806
],
[
-1170,
2078
],
[
-2313,
2555
],
[
-1353,
1077
],
[
-1,
0
],
[
-3793,
2237
],
[
-458,
-187
],
[
-262,
-372
],
[
58,
-275
],
[
-2332,
689
],
[
-1083,
2414
],
[
-3396,
3472
],
[
-2286,
2659
],
[
-1596,
507
],
[
-1255,
623
],
[
-2539,
2247
],
[
-3552,
1984
],
[
-2238,
771
],
[
-2656,
622
],
[
-1313,
1531
],
[
-1608,
996
],
[
-4230,
2623
],
[
-2831,
2333
],
[
-3425,
3651
],
[
-2335,
1984
],
[
-1188,
454
],
[
-1518,
995
],
[
-1556,
1021
],
[
-2355,
749
],
[
-1810,
348
],
[
-518,
-57
],
[
-669,
-1462
],
[
390,
-1383
],
[
227,
-1979
],
[
-2541,
-49
],
[
-4982,
-1389
],
[
-1802,
354
],
[
-1936,
129
],
[
-1956,
475
],
[
-3648,
2058
],
[
-564,
475
],
[
-2384,
485
],
[
-1129,
-580
],
[
-1421,
640
],
[
-1673,
3455
],
[
487,
770
],
[
1790,
1921
],
[
1034,
430
],
[
7,
2
],
[
272,
1172
],
[
-58,
2691
],
[
-2004,
4538
],
[
-2890,
5952
],
[
-1771,
3040
],
[
-2152,
2828
],
[
-144,
190
],
[
-1810,
1878
],
[
-1625,
1267
],
[
-2296,
1160
],
[
-2542,
331
],
[
-3340,
-274
],
[
-592,
-277
],
[
-5712,
260
],
[
-688,
-148
],
[
-383,
-446
],
[
-2612,
-409
],
[
-2547,
355
],
[
-1222,
-68
],
[
-3744,
-1114
],
[
-356,
-211
],
[
-1753,
-1932
],
[
-1602,
1343
],
[
-1829,
1432
],
[
-1389,
705
],
[
-4038,
527
],
[
-3103,
701
],
[
-976,
-260
],
[
-662,
206
],
[
-957,
299
],
[
-2241,
1230
],
[
-1871,
646
],
[
-745,
30
],
[
-3196,
1782
],
[
-3159,
776
],
[
-1808,
828
],
[
-941,
108
],
[
-1126,
-503
],
[
-1983,
584
],
[
-2859,
2063
],
[
-2830,
2043
],
[
-1411,
580
],
[
-788,
42
],
[
-506,
127
],
[
-1100,
1649
],
[
-914,
1485
],
[
-1936,
3958
],
[
-865,
2248
],
[
-410,
1931
],
[
-827,
1477
],
[
-1197,
845
],
[
-1088,
-226
],
[
-1061,
309
],
[
-2378,
1571
],
[
-1139,
1457
],
[
-2060,
1594
],
[
-528,
172
],
[
-1213,
-392
],
[
-214,
84
],
[
-3631,
3675
],
[
-321,
240
],
[
-469,
58
],
[
-2447,
1923
],
[
-1132,
165
],
[
-544,
166
],
[
-3151,
960
],
[
-2559,
971
],
[
-2190,
1889
],
[
-5585,
802
],
[
-2140,
-559
],
[
-954,
179
],
[
-2257,
-137
],
[
-1586,
-380
],
[
340,
-443
],
[
-689,
-543
],
[
-1685,
-819
],
[
-1975,
53
],
[
-1566,
739
],
[
-3931,
1382
],
[
-866,
169
],
[
-3989,
-190
],
[
-1751,
-823
],
[
-1966,
84
],
[
-4987,
2653
],
[
-3036,
143
],
[
-1510,
987
],
[
-3515,
1669
],
[
-2991,
315
],
[
-1154,
-188
],
[
-3688,
-153
],
[
-839,
169
],
[
-2062,
857
],
[
-2214,
367
],
[
-4120,
-320
],
[
-4085,
23
],
[
-1217,
-263
],
[
-1923,
-68
],
[
-2455,
95
],
[
-1172,
239
],
[
-401,
-94
],
[
-258,
-280
],
[
-3848,
-874
],
[
-9788,
-768
],
[
-920,
-467
],
[
-1941,
80
],
[
-509,
2879
],
[
-366,
626
],
[
-988,
951
],
[
-2033,
3470
],
[
-1299,
880
],
[
-5499,
2709
],
[
-2633,
-32
],
[
-355,
-326
],
[
-1029,
48
],
[
-1481,
1287
],
[
-772,
1564
],
[
534,
2466
],
[
1471,
3175
],
[
2253,
6080
],
[
148,
1324
],
[
-119,
536
],
[
-1282,
2215
],
[
-1116,
777
],
[
-1079,
1881
],
[
1405,
3948
],
[
649,
2428
],
[
623,
2791
],
[
-36,
1628
],
[
-589,
903
],
[
-2234,
1443
],
[
-285,
1450
],
[
-498,
737
],
[
-1514,
5
],
[
-773,
310
],
[
2134,
7417
],
[
867,
3015
],
[
625,
3179
],
[
354,
3000
],
[
34,
1778
],
[
-134,
2489
],
[
-470,
2307
],
[
-829,
1669
],
[
-664,
860
],
[
-1104,
590
],
[
-537,
-140
],
[
-688,
109
],
[
-1158,
807
],
[
-1161,
1106
],
[
-515,
213
],
[
-972,
294
],
[
-1950,
262
],
[
-1424,
-72
],
[
-580,
-326
],
[
-198,
-580
],
[
76,
-923
],
[
-429,
-80
],
[
-1801,
970
],
[
-688,
925
],
[
-1867,
772
],
[
-4029,
2053
],
[
-912,
217
],
[
-1654,
2027
],
[
-2310,
2341
],
[
-8,
645
],
[
731,
2515
],
[
952,
1727
],
[
1204,
3480
],
[
439,
2071
],
[
54,
1476
],
[
-386,
3407
],
[
-303,
1080
],
[
-1512,
2841
],
[
-1178,
1271
],
[
-1078,
720
],
[
-3756,
-248
],
[
-408,
138
],
[
-499,
604
],
[
-1320,
681
],
[
-651,
-123
],
[
-2650,
177
],
[
-2166,
2521
],
[
-2671,
2420
],
[
-665,
226
],
[
-4055,
4131
],
[
-2377,
4670
],
[
-733,
780
],
[
-973,
590
],
[
-2253,
3098
],
[
-2158,
817
],
[
-622,
-254
],
[
-5424,
1679
],
[
-2071,
1063
],
[
-1231,
780
],
[
-469,
1617
],
[
-650,
781
],
[
-789,
524
],
[
-978,
1216
],
[
-112,
4138
],
[
-888,
1776
],
[
-733,
1452
],
[
-1354,
1274
],
[
-1009,
950
],
[
-3047,
2037
],
[
-1826,
2231
],
[
-615,
1128
],
[
-1344,
506
],
[
-1229,
722
],
[
-2206,
1970
],
[
101,
1192
],
[
-217,
792
],
[
-874,
1633
],
[
-1339,
5326
],
[
-1646,
3160
],
[
-825,
665
],
[
-1973,
820
],
[
-2125,
573
],
[
-1547,
184
],
[
-485,
382
],
[
-1537,
2660
],
[
118,
360
],
[
-357,
1191
],
[
-1361,
739
],
[
-1151,
1658
],
[
-325,
1258
],
[
-742,
1558
],
[
-4914,
5421
],
[
-3603,
3095
],
[
-6098,
3405
],
[
-1674,
718
],
[
-965,
-138
],
[
-657,
140
],
[
-1235,
805
],
[
-911,
938
],
[
-347,
1027
],
[
-1227,
1831
],
[
-2221,
1186
],
[
-1333,
1451
],
[
-605,
1582
],
[
175,
2388
],
[
-1219,
1882
],
[
270,
595
],
[
83,
1897
],
[
-134,
1238
],
[
-240,
485
],
[
-848,
648
],
[
-301,
1105
],
[
265,
1169
],
[
-1047,
2958
],
[
-1138,
1960
],
[
-428,
1384
],
[
232,
1192
],
[
44,
1005
],
[
-478,
568
],
[
-96,
1061
],
[
1546,
136
],
[
276,
214
],
[
-639,
3669
],
[
-976,
686
],
[
-693,
123
],
[
-175,
-379
],
[
-572,
50
],
[
-1484,
938
],
[
-584,
751
],
[
794,
239
],
[
2799,
3726
],
[
303,
1673
],
[
206,
299
],
[
658,
23
],
[
564,
-254
],
[
3279,
-2670
],
[
107,
-791
],
[
224,
-32
],
[
1499,
327
],
[
1046,
694
],
[
1785,
1997
],
[
999,
1562
],
[
675,
1303
],
[
1031,
2708
],
[
720,
3303
],
[
138,
3808
],
[
1689,
5673
],
[
-317,
1181
],
[
-1734,
3532
],
[
-116,
211
],
[
-1665,
3029
],
[
-3366,
5509
],
[
-1742,
1963
],
[
-1411,
1235
],
[
-1148,
749
],
[
-2296,
971
],
[
-915,
-11
],
[
-1187,
-696
],
[
-2053,
-1826
],
[
-301,
-11
],
[
-781,
494
],
[
-2771,
614
],
[
-1070,
-253
],
[
-370,
-1161
],
[
-2233,
-277
],
[
-1585,
-27
],
[
-1259,
266
],
[
-2590,
545
],
[
-3366,
2005
],
[
-1411,
623
],
[
-3094,
2385
],
[
-1878,
1108
],
[
-4476,
4802
],
[
-807,
1382
],
[
-2374,
3082
],
[
-788,
588
],
[
-1280,
956
],
[
-756,
188
],
[
-882,
-285
],
[
-729,
-13
],
[
-643,
216
],
[
-174,
366
],
[
173,
1049
],
[
-73,
543
],
[
-603,
861
],
[
-1533,
1211
],
[
-195,
847
],
[
-515,
973
],
[
-1186,
877
],
[
-1102,
197
],
[
-629,
449
],
[
-779,
902
],
[
-205,
2498
],
[
-175,
612
],
[
-666,
800
],
[
-320,
911
],
[
64,
744
],
[
658,
1828
],
[
1009,
7511
],
[
46,
2344
],
[
-818,
1644
],
[
-1365,
1872
],
[
-1985,
4581
],
[
-224,
2701
],
[
-593,
2005
],
[
-1538,
1858
],
[
-438,
253
],
[
-394,
-187
],
[
-575,
-272
],
[
-344,
-163
],
[
-84,
-27
],
[
-38,
-12
],
[
-647,
-204
],
[
-62,
37
],
[
-473,
279
],
[
-1693,
2744
],
[
-276,
1685
],
[
286,
806
],
[
175,
126
],
[
107,
644
],
[
-428,
2522
],
[
88,
1531
],
[
1537,
949
],
[
448,
1320
],
[
262,
3366
],
[
-262,
4475
],
[
-549,
2290
],
[
-395,
1646
],
[
-283,
2650
],
[
-252,
2352
],
[
-243,
1024
],
[
892,
790
],
[
1209,
-41
],
[
691,
285
],
[
749,
2132
],
[
754,
-228
],
[
637,
-424
],
[
3682,
668
],
[
1799,
49
],
[
906,
-614
],
[
1247,
-1573
],
[
922,
-5883
],
[
560,
-279
],
[
233,
275
],
[
216,
-34
],
[
846,
-540
],
[
-483,
-1529
],
[
-843,
270
],
[
-2039,
-975
],
[
-177,
-85
],
[
541,
-3005
],
[
1298,
-1778
],
[
-128,
-1036
],
[
-222,
-208
],
[
-924,
-207
],
[
128,
-1140
],
[
2005,
-1208
],
[
987,
-1106
],
[
-318,
-483
],
[
-1146,
345
],
[
-287,
-69
],
[
-509,
-863
],
[
1783,
-1382
],
[
4139,
-172
],
[
223,
-380
],
[
-32,
-380
],
[
955,
-864
],
[
4203,
-276
],
[
1051,
-691
],
[
732,
-863
],
[
150,
-106
],
[
633,
-448
],
[
1089,
-770
],
[
1057,
-748
],
[
1720,
-138
],
[
159,
-1555
],
[
2579,
-1934
],
[
1242,
-310
],
[
589,
155
],
[
923,
553
],
[
892,
-449
],
[
318,
-380
],
[
1128,
563
],
[
464,
231
],
[
-64,
2245
],
[
-1624,
3350
],
[
-509,
242
],
[
-350,
483
],
[
-669,
1520
],
[
-255,
691
],
[
160,
1312
],
[
-96,
691
],
[
-637,
3523
],
[
-987,
2866
],
[
-764,
864
],
[
-796,
414
],
[
-1783,
1347
],
[
-638,
524
],
[
-954,
98
],
[
-764,
725
],
[
-2452,
1727
],
[
-891,
1450
],
[
-191,
415
],
[
79,
570
],
[
478,
276
],
[
709,
282
],
[
224,
364
],
[
-1082,
789
],
[
-1006,
364
],
[
-1101,
283
],
[
-1044,
223
],
[
-764,
101
],
[
-1007,
445
],
[
-1417,
465
],
[
-997,
436
],
[
-159,
70
],
[
-17,
232
],
[
-76,
1057
],
[
-370,
368
],
[
-12,
12
],
[
191,
1071
],
[
987,
1416
],
[
573,
380
],
[
1114,
69
],
[
223,
276
],
[
255,
1865
],
[
-892,
2763
],
[
48,
1986
],
[
-318,
449
],
[
-23,
21
],
[
-996,
912
],
[
-1051,
311
],
[
-2197,
0
],
[
-509,
-484
],
[
-510,
-35
],
[
-1082,
139
],
[
-701,
310
],
[
-318,
208
],
[
-127,
1312
],
[
-446,
484
],
[
-605,
138
],
[
-1210,
932
],
[
-355,
660
],
[
-1237,
2069
],
[
32,
241
],
[
1401,
-241
],
[
350,
-277
],
[
329,
-311
],
[
832,
-162
],
[
3137,
2338
],
[
553,
1248
],
[
-107,
463
],
[
-382,
431
],
[
-191,
1001
],
[
96,
484
],
[
414,
172
],
[
405,
-445
],
[
1887,
-660
],
[
796,
173
],
[
1051,
794
],
[
541,
69
],
[
1433,
-276
],
[
1687,
1243
],
[
2006,
2314
],
[
0,
726
],
[
-370,
907
],
[
-617,
1510
],
[
-955,
898
],
[
-1847,
2349
],
[
-1241,
1070
],
[
-5031,
2763
],
[
-2929,
898
],
[
-694,
69
],
[
-7,
0
],
[
-605,
-1519
],
[
-2897,
-2038
],
[
-1051,
-69
],
[
-446,
276
],
[
-2865,
-414
],
[
-542,
-311
],
[
-73,
-238
],
[
-54,
-176
],
[
127,
-1175
],
[
319,
-725
],
[
286,
-1934
],
[
-827,
-1623
],
[
-701,
-2556
],
[
159,
-1347
],
[
319,
-449
],
[
1273,
-794
],
[
1815,
-449
],
[
955,
-760
],
[
446,
-829
],
[
0,
-380
],
[
-796,
-621
],
[
-573,
276
],
[
-923,
34
],
[
-1624,
-1588
],
[
-159,
-208
],
[
0,
-587
],
[
254,
-1105
],
[
701,
-345
],
[
127,
-415
],
[
-637,
-414
],
[
-1337,
172
],
[
-350,
-276
],
[
0,
-829
],
[
923,
-725
],
[
701,
0
],
[
796,
-345
],
[
605,
-864
],
[
-32,
-829
],
[
1337,
-898
],
[
987,
-69
],
[
892,
-1001
],
[
95,
-311
],
[
-1146,
-1036
],
[
-1178,
-242
],
[
-1178,
587
],
[
-637,
-103
],
[
-255,
-484
],
[
32,
-518
],
[
639,
-3287
],
[
6,
-32
],
[
-261,
-747
],
[
-68,
22
],
[
-353,
115
],
[
-875,
-199
],
[
-1256,
-287
],
[
-1698,
274
],
[
-73,
11
],
[
-1333,
581
],
[
-1138,
622
],
[
-1216,
1647
],
[
-2219,
781
],
[
-1654,
1678
],
[
-2512,
1156
],
[
-1252,
1189
],
[
-1609,
757
],
[
-2136,
220
],
[
-360,
-17
],
[
-1109,
-557
],
[
-883,
-775
],
[
-2399,
1140
],
[
-545,
1646
],
[
-389,
591
],
[
-1723,
1024
],
[
-1122,
262
],
[
-1664,
1406
],
[
-826,
1909
],
[
-552,
764
],
[
-2333,
2119
],
[
-3423,
2109
],
[
-2485,
903
],
[
-5604,
700
],
[
-1664,
-337
],
[
-1515,
-894
],
[
-914,
-1174
],
[
-59,
-511
],
[
218,
-364
],
[
329,
-543
],
[
231,
-344
],
[
-4834,
259
],
[
341,
492
],
[
415,
227
],
[
464,
184
],
[
1859,
4044
],
[
3068,
7515
],
[
857,
2702
],
[
293,
1635
],
[
-54,
1054
],
[
-389,
1227
],
[
-1146,
1208
],
[
-94,
1203
],
[
-170,
413
],
[
-2319,
3246
],
[
-195,
466
],
[
70,
220
],
[
592,
-227
],
[
1808,
564
],
[
133,
825
],
[
-961,
1816
],
[
-899,
555
],
[
-806,
1048
],
[
-243,
672
],
[
-565,
660
],
[
-118,
137
],
[
-1967,
1431
],
[
-1401,
317
],
[
-1199,
-304
],
[
-235,
-525
],
[
142,
-366
],
[
-145,
-302
],
[
-460,
-109
],
[
-529,
403
],
[
-1071,
2153
],
[
607,
1333
],
[
17,
2602
],
[
-1684,
3236
],
[
-1764,
2640
],
[
-1817,
2298
],
[
-627,
1383
],
[
-1605,
950
],
[
-2054,
1639
],
[
-3487,
2044
],
[
-4624,
1765
],
[
-3635,
3080
],
[
-972,
341
],
[
-3381,
2331
],
[
-1113,
2582
],
[
-610,
717
],
[
-2166,
1101
],
[
-723,
1553
],
[
-1835,
2648
],
[
-472,
254
],
[
-258,
769
],
[
-2632,
3208
],
[
-881,
1331
],
[
-1899,
1821
],
[
-2795,
1606
],
[
-2410,
1029
],
[
-1008,
1249
],
[
-816,
1542
],
[
-808,
882
],
[
-2933,
2261
],
[
-766,
490
],
[
-634,
2
],
[
-1347,
1189
],
[
-131,
514
],
[
-365,
398
],
[
-3242,
2227
],
[
-393,
15
],
[
-458,
155
],
[
-469,
961
],
[
-242,
1167
],
[
-501,
727
],
[
-2749,
2223
],
[
-2183,
2073
],
[
-1443,
444
],
[
-220,
1273
],
[
128,
725
],
[
-1223,
1873
],
[
583,
92
],
[
373,
177
],
[
750,
761
],
[
992,
1418
],
[
1387,
2859
],
[
599,
1782
],
[
63,
1041
],
[
-377,
2766
],
[
-1890,
5389
],
[
-789,
1784
],
[
-1404,
1511
],
[
-193,
401
],
[
-419,
2263
],
[
-1828,
2819
],
[
-475,
217
],
[
-886,
1945
],
[
-230,
2652
],
[
-1024,
2861
],
[
-1080,
742
],
[
-473,
783
],
[
204,
502
],
[
-129,
867
],
[
-808,
2225
],
[
254,
1218
],
[
-836,
1523
],
[
-459,
534
],
[
-316,
1789
],
[
-95,
834
],
[
388,
1190
],
[
42,
2831
],
[
700,
4192
],
[
1854,
4821
],
[
1116,
1816
],
[
549,
1272
],
[
1172,
3306
],
[
-71,
744
],
[
-1966,
4718
],
[
377,
524
],
[
119,
1263
],
[
-393,
4057
],
[
-613,
2553
],
[
-1513,
2807
],
[
-1609,
782
],
[
-467,
522
],
[
-200,
797
],
[
-340,
859
],
[
-291,
1440
],
[
91,
2514
],
[
-257,
2048
],
[
-1160,
3842
],
[
-199,
217
],
[
-2695,
1195
],
[
-2549,
1858
],
[
-728,
1297
],
[
-69,
612
],
[
-1381,
3017
],
[
-2423,
1337
],
[
-750,
1611
],
[
-1690,
2620
],
[
-1540,
1117
],
[
-2732,
2980
],
[
-1164,
1271
],
[
-1995,
1159
],
[
-843,
51
],
[
-374,
-367
],
[
-350,
142
],
[
-727,
751
],
[
-71,
3835
],
[
-620,
1301
],
[
-2283,
2673
],
[
-2861,
1328
],
[
-2998,
829
],
[
-1664,
669
],
[
-2629,
3204
],
[
-1576,
1127
],
[
-2657,
1340
],
[
-3707,
2590
],
[
-2375,
1878
],
[
-660,
1135
],
[
-1496,
698
],
[
-938,
683
],
[
-1041,
1110
],
[
-22,
1609
],
[
1536,
4054
],
[
-513,
1773
],
[
-338,
378
],
[
-603,
1587
],
[
-249,
2618
],
[
-802,
1907
],
[
-534,
623
],
[
-1207,
867
],
[
-1083,
1590
],
[
-678,
1685
],
[
96,
541
],
[
1164,
1997
],
[
1138,
2923
],
[
167,
1059
],
[
-369,
538
],
[
409,
1483
],
[
362,
407
],
[
1513,
2727
],
[
3322,
7148
],
[
1387,
2437
],
[
252,
191
],
[
2280,
4042
],
[
3961,
5861
],
[
1962,
3612
],
[
2561,
3770
],
[
2452,
4064
],
[
1790,
3424
],
[
2068,
5242
],
[
1841,
6705
],
[
582,
4106
],
[
-1293,
2146
],
[
-729,
420
],
[
-513,
196
],
[
-452,
-33
],
[
-423,
-121
],
[
-168,
-150
],
[
-226,
-38
],
[
-230,
258
],
[
-39,
673
],
[
-47,
2874
],
[
-588,
1251
],
[
145,
2422
],
[
-618,
830
],
[
139,
934
],
[
530,
459
],
[
862,
-230
],
[
572,
405
],
[
2055,
4754
],
[
1527,
4216
],
[
58,
1162
],
[
1372,
4961
],
[
1291,
6273
],
[
654,
2925
],
[
897,
6831
],
[
-238,
2656
]
]
]
}
}
}
]
})
headers = {
'Authorization': 'Bearer [MY_TOKEN]',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
The above GeoJSON is a representation of the state of California. The context_id should match the value that will later be sent to the "state" field in the original context class.
The following is an example JSON of the original context class, containing the "state" field.
{
"occupation": "education",
"city": "San Diego",
"state": "California",
"purpose": "Vacation costs",
"credit_score": 0.5817015124979052,
"loan_taken": true,
"return_until": 1619601064000,
"offered_amount": 1919,
"approved_amount": 1919,
"feature_0": 1078972.3298817815,
"feature_1": 1.6442012841083546,
"feature_2": 37,
"feature_3": 13850,
"feature_4": 0,
"feature_5": 0.9945077174460385,
"feature_6": 35,
"feature_7": 0,
"feature_8": 733.510920638502,
"feature_9": 57.75004530355074,
"stage": "train",
"model_version": "v2",
"label": 0,
"MONA_ARC_CLASS": "LOAN_APPLICATION_TUTORIAL"
}
Now in order to tell Mona to import the GeoJSON to the original context class, the "state" field should have a "geoshape_from" key in the configuration, as follows:
{
"state": {
"function": "identity",
"source": "state",
"type": "string",
"geoshape_from": {
"context_class": "STATES",
"field": "boundaries"
}
}
}
Note that the field "boundaries" is the corresponding field containing the GeoJSON in the context sent to STATES.
Now when segmenting the data by state, the investigations page will show you a map of all the states, and the averages of your chosen metrics.
Updated almost 2 years ago