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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# pip install ipywidgets\n",
    "# pip install plotly\n",
    "# pip install ipympl"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "from typing import Any\n",
    "from typing import Dict\n",
    "from typing import List\n",
    "import warnings\n",
    "import math\n",
    "\n",
    "import ipywidgets as widgets\n",
    "from ipywidgets import interact, interactive, interact_manual, GridBox, Layout, VBox, HBox\n",
    "import matplotlib.pyplot as plt\n",
    "import plotly.graph_objs as go\n",
    "from plotly.subplots import make_subplots\n",
    "\n",
    "from data_encoder import DataEncoder\n",
    "\n",
    "# Silence xgboost warnings\n",
    "warnings.filterwarnings(\"ignore\")\n",
    "from xgboost import XGBRegressor\n",
    "from keras.models import load_model\n",
    "\n",
    "\n",
    "pd.set_option('display.max_columns', None)\n",
    "\n",
    "%matplotlib inline\n",
    "%matplotlib widget"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "LAND_USE_COLS = ['c3ann', 'c3nfx', 'c3per', 'c4ann', 'pastr', 'range', 'secdf', 'secdn', 'urban']\n",
    "DIFF_LAND_USE_COLS = [f\"{col}_diff\" for col in LAND_USE_COLS]\n",
    "PRESCRIBED_LAND_USE_COLS = [f\"{col}_prescribed\" for col in LAND_USE_COLS]\n",
    "OTHER_FEATURES_COLS = ['primf', 'primn', 'cell_area']\n",
    "ALL_LAND_USE_COLS = ['primf', 'primn'] + LAND_USE_COLS\n",
    "COLS_MAP = dict(zip(LAND_USE_COLS, DIFF_LAND_USE_COLS))\n",
    "CHART_COLS = ALL_LAND_USE_COLS + [\"nonland\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "CONTEXT_COLUMNS = ['c3ann', 'c3nfx', 'c3per', 'c4ann', 'pastr', 'primf', 'primn', 'range', 'secdf', 'secdn', 'urban', 'cell_area']\n",
    "ACTION_COLUMNS = ['c3ann_diff', 'c3nfx_diff', 'c3per_diff', 'c4ann_diff', 'pastr_diff', 'range_diff', 'secdf_diff', 'secdn_diff', 'urban_diff']\n",
    "OUTCOME_COLUMNS = ['ELUC', 'Change']\n",
    "CONTEXT_ACTION_COLUMNS = CONTEXT_COLUMNS + ACTION_COLUMNS"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "DATASET_CSV = '../data/gcb/processed/uk_eluc.csv'\n",
    "with open(DATASET_CSV) as df_file:\n",
    "    data_source_df = pd.read_csv(df_file)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "data_source_df.tail()"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Code"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "fields = {'lat': {'data_type': 'FLOAT', 'has_nan': False, 'mean': 53.93974, 'range': [50.125, 58.625], 'std_dev': 2.2288961, 'sum': 4630295, 'valued': 'CONTINUOUS'},\n",
    "          'lon': {'data_type': 'FLOAT', 'has_nan': False, 'mean': -2.7644422, 'range': [-7.375, 1.625], 'std_dev': 1.9270877, 'sum': -237305.25, 'valued': 'CONTINUOUS'},\n",
    "          'ELUC': {'data_type': 'FLOAT', 'has_nan': False, 'mean': -0.021404957, 'range': [-1.2820702, 2.3366203], 'std_dev': 0.18355964, 'sum': -1837.4443, 'valued': 'CONTINUOUS'},\n",
    "          'time': {'data_type': 'INT', 'has_nan': False, 'mean': 1936, 'range': [1851, 2021], 'std_dev': 49.362892, 'sum': 166190110, 'valued': 'CONTINUOUS'},\n",
    "          'c3ann': {'data_type': 'FLOAT', 'has_nan': False, 'mean': 0.2667192, 'range': [0, 1], 'std_dev': 0.19391803, 'sum': 22895.709, 'valued': 'CONTINUOUS'},\n",
    "          'c3nfx': {'data_type': 'FLOAT', 'has_nan': False, 'mean': 0.014878354, 'range': [0, 1], 'std_dev': 0.0128484, 'sum': 1277.1877, 'valued': 'CONTINUOUS'},\n",
    "          'c3per': {'data_type': 'FLOAT', 'has_nan': False, 'mean': 0.00053631567, 'range': [0, 1], 'std_dev': 0.000610856, 'sum': 46.03841, 'valued': 'CONTINUOUS'},\n",
    "          'c4ann': {'data_type': 'FLOAT', 'has_nan': False, 'mean': 0.0063492954, 'range': [0, 1], 'std_dev': 0.0056106453, 'sum': 545.0362, 'valued': 'CONTINUOUS'},\n",
    "          'i_lat': {'data_type': 'FLOAT', 'has_nan': False, 'mean': 53.93974, 'range': [50.125, 58.625], 'std_dev': 2.2288961, 'sum': 4630295, 'valued': 'CONTINUOUS'},\n",
    "          'i_lon': {'data_type': 'FLOAT', 'has_nan': False, 'mean': -2.7644422, 'range': [-7.375, 1.625], 'std_dev': 1.9270877, 'sum': -237305.25, 'valued': 'CONTINUOUS'},\n",
    "          'pastr': {'data_type': 'FLOAT', 'has_nan': False, 'mean': 0.31008992, 'range': [0, 1], 'std_dev': 0.1939609, 'sum': 26618.738, 'valued': 'CONTINUOUS'},\n",
    "          'primf': {'data_type': 'FLOAT', 'has_nan': False, 'mean': 3.1008868e-10, 'range': [0, 1], 'std_dev': 1.2718036e-09, 'sum': 2.6618633e-05, 'valued': 'CONTINUOUS'},\n",
    "          'primn': {'data_type': 'FLOAT', 'has_nan': False, 'mean': 7.880206e-11, 'range': [0, 1], 'std_dev': 6.0690847e-10, 'sum': 6.7645265e-06, 'valued': 'CONTINUOUS'},\n",
    "          'range': {'data_type': 'FLOAT', 'has_nan': False, 'mean': 0.058702312, 'range': [0, 1], 'std_dev': 0.12839052, 'sum': 5039.124, 'valued': 'CONTINUOUS'},\n",
    "          'secdf': {'data_type': 'FLOAT', 'has_nan': False, 'mean': 0.18520375, 'range': [0, 1], 'std_dev': 0.19961607, 'sum': 15898.26, 'valued': 'CONTINUOUS'},\n",
    "          'secdn': {'data_type': 'FLOAT', 'has_nan': False, 'mean': 0.06774911, 'range': [0, 1], 'std_dev': 0.1195767, 'sum': 5815.7197, 'valued': 'CONTINUOUS'},\n",
    "          'urban': {'data_type': 'FLOAT', 'has_nan': False, 'mean': 0.030199211, 'range': [0, 1], 'std_dev': 0.06684742, 'sum': 2592.3606, 'valued': 'CONTINUOUS'},\n",
    "          'ELUC_diff': {'data_type': 'FLOAT', 'has_nan': False, 'mean': 0.00085764704, 'range': [-5, 5], 'std_dev': 0.091957845, 'sum': 73.62214, 'valued': 'CONTINUOUS'},\n",
    "          'cell_area': {'data_type': 'FLOAT', 'has_nan': False, 'mean': 45453.707, 'range': [40233.22, 49543.36], 'std_dev': 2439.213, 'sum': 3901837300, 'valued': 'CONTINUOUS'},\n",
    "          'c3ann_diff': {'data_type': 'FLOAT', 'has_nan': False, 'mean': -0.0003815445, 'range': [-1, 1], 'std_dev': 0.0042161522, 'sum': -32.75254, 'valued': 'CONTINUOUS'},\n",
    "          'c3nfx_diff': {'data_type': 'FLOAT', 'has_nan': False, 'mean': -2.3976065e-05, 'range': [-1, 1], 'std_dev': 0.00024510472, 'sum': -2.0581534, 'valued': 'CONTINUOUS'},\n",
    "          'c3per_diff': {'data_type': 'FLOAT', 'has_nan': False, 'mean': -5.9571926e-07, 'range': [-1, 1], 'std_dev': 1.0220871e-05, 'sum': -0.05113773, 'valued': 'CONTINUOUS'},\n",
    "          'c4ann_diff': {'data_type': 'FLOAT', 'has_nan': False, 'mean': -1.0171406e-05, 'range': [-1, 1], 'std_dev': 0.00010547795, 'sum': -0.8731338, 'valued': 'CONTINUOUS'},\n",
    "          'pastr_diff': {'data_type': 'FLOAT', 'has_nan': False, 'mean': 0.0011081528, 'range': [-1, 1], 'std_dev': 0.0058669676, 'sum': 95.12605, 'valued': 'CONTINUOUS'},\n",
    "          'range_diff': {'data_type': 'FLOAT', 'has_nan': False, 'mean': 0.00036852885, 'range': [-1, 1], 'std_dev': 0.007347369, 'sum': 31.635254, 'valued': 'CONTINUOUS'},\n",
    "          'secdf_diff': {'data_type': 'FLOAT', 'has_nan': False, 'mean': -0.00081145874, 'range': [-1, 1], 'std_dev': 0.008251627, 'sum': -69.65724, 'valued': 'CONTINUOUS'},\n",
    "          'secdn_diff': {'data_type': 'FLOAT', 'has_nan': False, 'mean': -0.0005189244, 'range': [-1, 1], 'std_dev': 0.0052026906, 'sum': -44.54551, 'valued': 'CONTINUOUS'},\n",
    "          'urban_diff': {'data_type': 'FLOAT', 'has_nan': False, 'mean': 0.00026998913, 'range': [-1, 1], 'std_dev': 0.0007861656, 'sum': 23.176407, 'valued': 'CONTINUOUS'},\n",
    "          'cell_area_diff': {'data_type': 'FLOAT', 'has_nan': False, 'mean': 45453.707, 'range': [40233.22, 49543.36], 'std_dev': 2439.213, 'sum': 3901837300, 'valued': 'CONTINUOUS'}}\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "cao_mapping = {\n",
    "    'context': ['lat', 'lon', 'time', 'c3ann', 'c3nfx', 'c3per', 'c4ann', 'i_lat', 'i_lon', 'pastr', 'primf', 'primn', 'range', 'secdf', 'secdn', 'urban', 'cell_area'],\n",
    "    'actions': ['c3ann_diff', 'c3nfx_diff', 'c3per_diff', 'c4ann_diff', 'pastr_diff', 'range_diff', 'secdf_diff', 'secdn_diff', 'urban_diff'],\n",
    "    'outcomes': ['ELUC', 'Change']}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "encoder = DataEncoder(fields, cao_mapping)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "min_lat = data_source_df[\"i_lat\"].min()\n",
    "max_lat = data_source_df[\"i_lat\"].max()\n",
    "min_lon = data_source_df[\"i_lon\"].min()\n",
    "max_lon = data_source_df[\"i_lon\"].max()\n",
    "min_time = data_source_df[\"time\"].min()\n",
    "max_time = data_source_df[\"time\"].max()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def _is_single_action_prescriptor(actions):\n",
    "    \"\"\"\n",
    "    Checks how many Actions have been defined in the Context, Actions, Outcomes mapping.\n",
    "    :return: True if only 1 action is defined, False otherwise\n",
    "    \"\"\"\n",
    "    return len(actions) == 1\n",
    "\n",
    "def _is_scalar(prescribed_action):\n",
    "    \"\"\"\n",
    "    Checks if the prescribed action contains a single value, i.e. a scalar, or an array.\n",
    "    A prescribed action contains a single value if it has been prescribed for a single context sample\n",
    "    :param prescribed_action: a scalar or an array\n",
    "    :return: True if the prescribed action contains a scalar, False otherwise.\n",
    "    \"\"\"\n",
    "    return prescribed_action.shape[0] == 1 and prescribed_action.shape[1] == 1\n",
    "\n",
    "def _convert_to_nn_input(context_df: pd.DataFrame) -> List[np.ndarray]:\n",
    "    \"\"\"\n",
    "    Converts a context DataFrame to a list of numpy arrays a neural network can ingest\n",
    "    :param context_df: a DataFrame containing inputs for a neural network. Number of inputs and size must match\n",
    "    :return: a list of numpy ndarray, on ndarray per neural network input\n",
    "    \"\"\"\n",
    "    # The NN expects a list of i inputs by s samples (e.g. 9 x 299).\n",
    "    # So convert the data frame to a numpy array (gives shape 299 x 9), transpose it (gives 9 x 299)\n",
    "    # and convert to list(list of 9 arrays of 299)\n",
    "    context_as_nn_input = list(context_df.to_numpy().transpose())\n",
    "    # Convert each column's list of 1D array to a 2D array\n",
    "    context_as_nn_input = [np.stack(context_as_nn_input[i], axis=0) for i in\n",
    "                           range(len(context_as_nn_input))]\n",
    "    return context_as_nn_input"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def prescribe_from_model(prescriptor, context_df: pd.DataFrame) -> Dict[str, Any]:\n",
    "    \"\"\"\n",
    "    Generates prescriptions using the passed neural network candidate and context\n",
    "    :param prescriptor: a Keras neural network\n",
    "    ::param context_df: a DataFrame containing the context to prescribe for,\n",
    "    :return: a dictionary of action name to action value or list of action values\n",
    "    \"\"\"\n",
    "    action_list = ['recommended_land_use']\n",
    "    \n",
    "    # Convert the input df\n",
    "    context_as_nn_input = _convert_to_nn_input(context_df)\n",
    "    row_index = context_df.index\n",
    "    \n",
    "    # Get the prescrib?ed actions\n",
    "    prescribed_actions = prescriptor.predict(context_as_nn_input)\n",
    "    actions = {}\n",
    "\n",
    "    if _is_single_action_prescriptor(action_list):\n",
    "        # Put the single action in an array to process it like multiple actions\n",
    "        prescribed_actions = [prescribed_actions]\n",
    "            \n",
    "    for i, action_col in enumerate(action_list):\n",
    "        if _is_scalar(prescribed_actions[i]):\n",
    "            # We have a single row and this action is numerical. Convert it to a scalar.\n",
    "            actions[action_col] = prescribed_actions[i].item()\n",
    "        else:\n",
    "            actions[action_col] = prescribed_actions[i].tolist()\n",
    "    \n",
    "    # Convert the prescribed actions to a DataFrame\n",
    "    prescribed_actions_df = pd.DataFrame(actions,\n",
    "                                         columns=action_list,\n",
    "                                         index=row_index)\n",
    "    return prescribed_actions_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def compute_percent_changed(encoded_context_actions_df):\n",
    "    # Sum the absolute values, but divide by 2 to avoid double counting\n",
    "    # Because positive diff is offset by negative diff\n",
    "    # context_action_df[DIFF_LAND_USE_COLS].abs().sum(axis=1) / 2\n",
    "\n",
    "    encoded_context_actions_df = encoded_context_actions_df.reset_index(drop=True)\n",
    "    # Decode in order to get the signed land usage diff values\n",
    "    context_action_df = encoder.decode_as_df(encoded_context_actions_df)\n",
    "\n",
    "    # Sum the positive diffs\n",
    "    percent_changed = context_action_df[context_action_df[DIFF_LAND_USE_COLS] > 0].sum(axis=1)\n",
    "    # Land usage is only a portion of that cell, e.g 0.8. Scale back to 1\n",
    "    # So that percent changed really represent the percentage of change within the land use\n",
    "    # portion of the cell\n",
    "    # I.e. how much of the pie chart has changed?\n",
    "    percent_changed = percent_changed / context_action_df[LAND_USE_COLS].sum(axis=1)\n",
    "    df = pd.DataFrame(percent_changed, columns=['Change'])\n",
    "    return df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def run_prescriptor(prescriptor_model, sample_context_df):\n",
    "    encoded_sample_context_df = encoder.encode_as_df(sample_context_df)\n",
    "    prescribed_actions_df = prescribe_from_model(prescriptor_model, encoded_sample_context_df)\n",
    "    reco_land_use_df = pd.DataFrame(prescribed_actions_df.recommended_land_use.tolist(),\n",
    "                                columns=LAND_USE_COLS)\n",
    "\n",
    "    used = sum(sample_context_df[LAND_USE_COLS].iloc[0].tolist())\n",
    "    for col in LAND_USE_COLS:\n",
    "        reco_land_use_df[col] *= used\n",
    "\n",
    "    # Reattach primf and primn\n",
    "    reco_land_use_df[\"primf\"] = sample_context_df[\"primf\"].to_numpy()\n",
    "    reco_land_use_df[\"primn\"] = sample_context_df[\"primn\"].to_numpy()\n",
    "\n",
    "    # Assuming there's no primary land left in this cell\n",
    "    # TODO: not correct. Need to account for primf and primn, that can't increase (no way to return to primary forest)\n",
    "    prescribed_land_use_pct = reco_land_use_df.iloc[0][ALL_LAND_USE_COLS].sum() * 100\n",
    "    print(f\"Presribed land usage: {prescribed_land_use_pct:.2f}% of land\")\n",
    "    \n",
    "    return reco_land_use_df[ALL_LAND_USE_COLS]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def run_predictor(predictor_model, context, actions):\n",
    "    encoded_sample_context_df = encoder.encode_as_df(sample_context_df)\n",
    "\n",
    "    actions = [a / 100 for a in actions]\n",
    "    reco_land_use_df = pd.DataFrame([actions], columns=CHART_COLS)\n",
    "    reco_land_use_df = reco_land_use_df[LAND_USE_COLS]\n",
    "\n",
    "    prescribed_actions_df = reco_land_use_df[LAND_USE_COLS].reset_index(drop=True) - sample_context_df[LAND_USE_COLS].reset_index(drop=True)\n",
    "    prescribed_actions_df.rename(COLS_MAP, axis=1, inplace=True)\n",
    "\n",
    "    encoded_prescribed_actions_df = encoder.encode_as_df(prescribed_actions_df)\n",
    "\n",
    "    encoded_context_actions_df = pd.concat([encoded_sample_context_df,\n",
    "                                        encoded_prescribed_actions_df],\n",
    "                                       axis=1)\n",
    "    \n",
    "    change_df = compute_percent_changed(encoded_context_actions_df)\n",
    "    \n",
    "    new_pred = predictor_model.predict(encoded_context_actions_df)\n",
    "    pred_df = pd.DataFrame(new_pred, columns=[\"ELUC\"])\n",
    "    # Decode output\n",
    "    out_df = encoder.decode_as_df(pred_df)\n",
    "    return out_df.iloc[0, 0], change_df.iloc[0, 0] * 100"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Predictor"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "predictor_model = XGBRegressor()\n",
    "predictor_model.load_model(\"predictors/xgboost_predictor.json\")"
   ]
  },
  {
   "attachments": {
    "319f2a83-efbb-4017-83fb-c47e2e335906.png": {
     "image/png": "iVBORw0KGgoAAAANSUhEUgAAAkAAAAGwCAIAAADOgk3lAAAMQGlDQ1BJQ0MgUHJvZmlsZQAASImVVwdYU8kWnltSIaEEEJASehNEagApIbQA0osgKiEJEEqMgaBiRxcVXLtYwIauiih2QCwoYmdR7H2xoKKsiwW78iYFdN1XvjffN3f++8+Z/5w5d+beOwBoHOdJJHmoJgD54kJpXGggc3RKKpP0FOCADshADbB4/AIJOyYmEsAy0P69vLsOEHl7xVGu9c/+/1q0BMICPgBIDMQZggJ+PsQHAMCr+BJpIQBEOW8xqVAix7ACHSkMEOL5cpylxFVynKHEexQ2CXEciFsBIKvzeNIsAOiXIM8s4mdBDXovxM5igUgMgAYTYr/8/AkCiNMhtoU2Eojl+qyMH3Sy/qaZMajJ42UNYuVcFIUcJCqQ5PGm/J/p+N8lP0824MMaVvVsaVicfM4wbzdzJ0TIsTrEPeKMqGiItSH+IBIo7CFGqdmysESlPWrEL+DAnAE9iJ0FvKAIiI0gDhHnRUWq+IxMUQgXYrhC0MmiQm4CxPoQzxcWBMerbDZKJ8SpfKH1mVIOW8Wf5UkVfuW+7styE9kq/dfZQq5KH6MXZyckQ0yF2LJIlBQFMR1ip4Lc+AiVzcjibE7UgI1UFieP3xLiOKE4NFCpjxVlSkPiVPZl+QUD88U2Zou4USq8rzA7IUyZH6yVz1PED+eCXRKK2YkDOsKC0ZEDcxEIg4KVc8eeCcWJ8SqdD5LCwDjlWJwqyYtR2ePmwrxQOW8OsVtBUbxqLJ5UCBekUh/PlBTGJCjjxItzeOExynjwJSAScEAQYAIZrBlgAsgBovaehh54p+wJATwgBVlACB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aCPw/m+nikXYVrPgAAAAASUVORK5CYII="
    }
   },
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Prescriptors\n",
    "![image.png](attachment:319f2a83-efbb-4017-83fb-c47e2e335906.png)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "PRESCRIPTOR_LIST = [\"1_1\", \"34_78\", \"50_67\", \"40_45\", \"30_28\", \"28_40\"]"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# User Interface"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "sample_context_df = None\n",
    "\n",
    "out = widgets.Output()\n",
    "\n",
    "\"\"\"\n",
    "Submits context and creates pie chart\n",
    "Updates sliders for pie chart accordingly\n",
    "\"\"\"\n",
    "def prescribe(b):\n",
    "    prescriptor_model = load_prescriptor()\n",
    "    prescribed_df = run_prescriptor(prescriptor_model, sample_context_df)\n",
    "\n",
    "    # Get other col back\n",
    "    data = prescribed_df.iloc[0].tolist()\n",
    "    other = fig[\"data\"][0].values[-1]\n",
    "    data.append(other)\n",
    "    data = dict(zip(CHART_COLS, data))\n",
    "\n",
    "    for feature in CHART_COLS:\n",
    "        # Unlock everything\n",
    "        if feature in LAND_USE_COLS:\n",
    "            ticks[feature].value = False\n",
    "\n",
    "        sliders[feature].unobserve(update_presc_plot, names=\"value\")\n",
    "        sliders[feature].value = data[feature] * 100\n",
    "        sliders[feature].observe(update_presc_plot, names=\"value\")\n",
    "    \n",
    "    # Clear figure and re-plot\n",
    "    fig[\"data\"] = (fig[\"data\"][0], )\n",
    "    fig.add_trace(go.Pie(values=list(data.values()), \n",
    "                     labels=CHART_COLS, \n",
    "                     domain=dict(x=[0.5, 1]), \n",
    "                     title=\"Prescribed\"), row=1, col=2)\n",
    "\n",
    "\n",
    "\"\"\"\n",
    "Locks a slider so it isn't affected by the sum to 100 computation\n",
    "\"\"\"\n",
    "def lock(change):\n",
    "    if change[\"new\"]:\n",
    "        locked.add(change[\"owner\"])\n",
    "    else:\n",
    "        locked.remove(change[\"owner\"])\n",
    "\n",
    "\n",
    "\"\"\"\n",
    "Real-time updater for prescribed pie chart\n",
    "\"\"\"\n",
    "def update_presc_plot(change):\n",
    "    with fig.batch_update():\n",
    "        if len(fig[\"data\"]) > 1:\n",
    "            owner = change[\"owner\"]\n",
    "            \n",
    "            # First compute what percentage is locked, count locked/zero sliders, and see if this slider is locked\n",
    "            locked_sum = 0\n",
    "            zero_count = 0\n",
    "            owner_locked = False\n",
    "            for feat in sliders:\n",
    "                if sliders[feat] != owner and (ticks[feat] in locked or sliders[feat].value == 0):\n",
    "                    locked_sum += sliders[feat].value\n",
    "                    zero_count += 1\n",
    "                # TODO: this is yucky\n",
    "                if sliders[feat] == owner and ticks[feat] in locked:\n",
    "                    owner_locked = True\n",
    "                    break\n",
    "            \n",
    "            # Block update if everything else is locked/0 or this is locked\n",
    "            if owner_locked or zero_count == len(sliders) - 1:\n",
    "                owner.unobserve(update_presc_plot, names=\"value\")\n",
    "                owner.value = change[\"old\"]\n",
    "                owner.observe(update_presc_plot, names=\"value\")\n",
    "\n",
    "            else:\n",
    "                # Add locked percentage to old and new because we don't factor\n",
    "                # them in to the 100% in our calculating the new value\n",
    "                old = change[\"old\"] + locked_sum\n",
    "                new = change[\"new\"] + locked_sum\n",
    "\n",
    "                for feat in sliders:\n",
    "                    slider = sliders[feat]\n",
    "                    tick = ticks[feat]\n",
    "                    if slider != owner and tick not in locked:\n",
    "                        # Unobserve so we don't infinitely recurse\n",
    "                        slider.unobserve(update_presc_plot, names=\"value\")\n",
    "                        # old value / old total = new value / new total\n",
    "                        # Must round to the same or higher place as the slider\n",
    "                        assert(math.log10(slider.step) % 1 == 0)\n",
    "                        slider.value = round(slider.value / (100 - old) * (100 - new), int(-1 * math.log10(slider.step)))\n",
    "                        slider.observe(update_presc_plot, names=\"value\")\n",
    "\n",
    "                fig[\"data\"][1][\"values\"] = [slider.value for slider in sliders.values()]\n",
    "\n",
    "\n",
    "\"\"\"\n",
    "Submits context and actions and outputs prediction\n",
    "\"\"\"\n",
    "def predict(b):\n",
    "    context = sample_context_df\n",
    "    actions = [slider.value for slider in sliders.values()]\n",
    "    outcome, change = run_predictor(predictor_model, context, actions)\n",
    "    output_area.value = f\"ELUC: {outcome} tC/ha/yr\\nChange: {change}%\"\n",
    "\n",
    "\n",
    "\"\"\"\n",
    "Computes the other column and adds it on to sample_context_df\n",
    "\"\"\"\n",
    "def compute_and_add_other(sample_context_df):\n",
    "    data = sample_context_df[ALL_LAND_USE_COLS]\n",
    "    diff = 1 - sample_context_df[ALL_LAND_USE_COLS].iloc[0].sum()\n",
    "    other_val = diff if diff >= 0 else 0\n",
    "    data[\"nonland\"] = [other_val]\n",
    "    return data\n",
    "\n",
    "\n",
    "\"\"\"\n",
    "Creates initial pie chart\n",
    "\"\"\"\n",
    "def show_context(c):\n",
    "    sample_df = data_source_df[(data_source_df.i_lat==latitude_input.value) & \n",
    "                           (data_source_df.i_lon==longitude_input.value) &\n",
    "                           (data_source_df.time==time_input.value)]\n",
    "    global sample_context_df\n",
    "    sample_context_df = sample_df[CONTEXT_COLUMNS]\n",
    "    #for testing purposes:\n",
    "    # sample_context_df[\"pastr\"].values[0] -= .12\n",
    "    # sample_context_df[\"primf\"].values[0] += 0.04\n",
    "    # sample_context_df[\"primn\"].values[0] += 0.04\n",
    "    # Plot initial context pie chart\n",
    "    data = compute_and_add_other(sample_context_df)\n",
    "    fig.add_trace(go.Pie(values=data.iloc[0].tolist(),\n",
    "                         labels=CHART_COLS, \n",
    "                         domain=dict(x=[0, 0.5]), \n",
    "                         title=\"Current\"), row=1, col=1)\n",
    "\n",
    "def load_prescriptor():\n",
    "    print(f\"Selected prescriptor: {prescriptor_dropdown.value}\")\n",
    "    prescriptor_id = prescriptor_dropdown.value\n",
    "    prescriptor_model_filename = os.path.join(\"prescriptors\",\n",
    "                                              prescriptor_id + '.h5')\n",
    "\n",
    "    print(f'Loading prescriptor model: {prescriptor_model_filename}')\n",
    "    prescriptor_model = load_model(prescriptor_model_filename, compile=False)\n",
    "    return prescriptor_model\n",
    "    \n",
    "# Context\n",
    "# Create the latitude input field\n",
    "latitude_input = widgets.FloatText(description='Latitude:', value=51.625)\n",
    "\n",
    "# Create the longitude input field\n",
    "longitude_input = widgets.FloatText(description='Longitude:', value=-3.375)\n",
    "\n",
    "# Create the time input field\n",
    "time_input = widgets.IntText(description='Year:', value=2021)\n",
    "\n",
    "\"\"\"\n",
    "Construct widgets and attach them to their functions\n",
    "\"\"\"\n",
    "sliders = {feature : widgets.FloatSlider(value=0.0, step=0.001, description=\"Prescribed \" + feature, style=dict(description_width='initial')) for feature in CHART_COLS}\n",
    "ticks = {feature : widgets.Checkbox(value=False, description=\"Lock \" + feature, style=dict(description_width='initial')) for feature in CHART_COLS}\n",
    "# Lock primaries and other\n",
    "ticks[\"primf\"].value = True\n",
    "ticks[\"primn\"].value = True\n",
    "ticks[\"nonland\"].value = True\n",
    "\n",
    "# For use in locking and unlocking sliders\n",
    "locked = set()\n",
    "locked.add(ticks[\"primf\"])\n",
    "locked.add(ticks[\"primn\"])\n",
    "locked.add(ticks[\"nonland\"])\n",
    "\n",
    "prescribe_button = widgets.Button(description=\"Prescribe\")\n",
    "prescribe_button.on_click(prescribe)\n",
    "\n",
    "predict_button = widgets.Button(description=\"Predict\")\n",
    "predict_button.on_click(predict)\n",
    "\n",
    "\n",
    "\"\"\"\n",
    "Display Interactables and Figures\n",
    "TODO: add titles, make layout prettier\n",
    "\"\"\"\n",
    "fig = go.FigureWidget(make_subplots(rows=1, cols=2, specs=[[{\"type\": \"pie\"}, {\"type\": \"pie\"}]]))\n",
    "fig.update_layout(margin=dict(l=0, r=0, t=0, b=0))\n",
    "\n",
    "# Context\n",
    "context_range = f\"Latitude must be between {min_lat} and {max_lat}, in 0.250 increments.\\nLongitude must be between {min_lon} and {max_lon}, in 0.250 increments.\\nYear must be between {min_time} and {max_time}.\"\n",
    "text_area = widgets.Textarea(value=context_range,\n",
    "                             rows=3,\n",
    "                            layout=widgets.Layout(height=\"auto\", width=\"auto\"))\n",
    "display(text_area)\n",
    "\n",
    "display(latitude_input, longitude_input, time_input)\n",
    "\n",
    "show_context_button = widgets.Button(description=\"Show land use\")\n",
    "show_context_button.on_click(show_context)\n",
    "display(show_context_button)\n",
    "\n",
    "# Prescribe\n",
    "prescriptor_label = widgets.Label('Select a prescriptor:')\n",
    "prescriptor_dropdown = widgets.Dropdown(options=PRESCRIPTOR_LIST)\n",
    "display(prescriptor_label, prescriptor_dropdown)\n",
    "\n",
    "display(prescribe_button)\n",
    "\n",
    "# Attach sliders and boxes to their observers\n",
    "for feat in sliders:\n",
    "    sliders[feat].observe(update_presc_plot, names=\"value\")\n",
    "    ticks[feat].observe(lock, names=\"value\")\n",
    "\n",
    "# Display sliders and boxes alongside figure\n",
    "slider_box = VBox(list(sliders.values()))\n",
    "tick_box = VBox(list(ticks.values()))\n",
    "fig_box = VBox([fig])\n",
    "display(HBox([slider_box, tick_box, fig_box]))\n",
    "\n",
    "# Predict\n",
    "display(predict_button)\n",
    "output_area = widgets.Textarea(value=\"\", rows=2, layout=widgets.Layout(height=\"auto\", width=\"auto\"))\n",
    "display(output_area)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}