Skip to content

Commit 1f9dcb3

Browse files
author
Manushi Majumdar
committed
new map widget changes
1 parent b987c85 commit 1f9dcb3

File tree

1 file changed

+43
-49
lines changed

1 file changed

+43
-49
lines changed

Diff for: samples/04_gis_analysts_data_scientists/temperature_forecast_using_time_series_data.ipynb

+43-49
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
},
7070
{
7171
"cell_type": "code",
72-
"execution_count": 3,
72+
"execution_count": 1,
7373
"metadata": {},
7474
"outputs": [],
7575
"source": [
@@ -92,7 +92,6 @@
9292
"import tensorflow.keras.backend as K\n",
9393
"\n",
9494
"from arcgis.gis import GIS\n",
95-
"from arcgis.features import SpatialDataFrame\n",
9695
"from arcgis.features.analysis import interpolate_points"
9796
]
9897
},
@@ -105,7 +104,7 @@
105104
},
106105
{
107106
"cell_type": "code",
108-
"execution_count": 5,
107+
"execution_count": 2,
109108
"metadata": {},
110109
"outputs": [],
111110
"source": [
@@ -131,7 +130,7 @@
131130
},
132131
{
133132
"cell_type": "code",
134-
"execution_count": 6,
133+
"execution_count": 3,
135134
"metadata": {},
136135
"outputs": [
137136
{
@@ -147,9 +146,9 @@
147146
" <div class=\"item_right\" style=\"float: none; width: auto; overflow: hidden;\">\n",
148147
" <a href='https://geosaurus.maps.arcgis.com/home/item.html?id=0856d38fea9149a48227cdc2f1e4f4f6' target='_blank'><b>england1</b>\n",
149148
" </a>\n",
150-
" <br/><img src='https://geosaurus.maps.arcgis.com/home/js/jsapi/esri/css/images/item_type_icons/featureshosted16.png' style=\"vertical-align:middle;\">Feature Layer Collection by api_data_owner\n",
149+
" <br/><br/><img src='https://geosaurus.maps.arcgis.com/home/js/jsapi/esri/css/images/item_type_icons/featureshosted16.png' style=\"vertical-align:middle;\" width=16 height=16>Feature Layer Collection by api_data_owner\n",
151150
" <br/>Last Modified: December 17, 2019\n",
152-
" <br/>0 comments, 22 views\n",
151+
" <br/>0 comments, 59 views\n",
153152
" </div>\n",
154153
" </div>\n",
155154
" "
@@ -158,7 +157,7 @@
158157
"<Item title:\"england1\" type:Feature Layer Collection owner:api_data_owner>"
159158
]
160159
},
161-
"execution_count": 6,
160+
"execution_count": 3,
162161
"metadata": {},
163162
"output_type": "execute_result"
164163
}
@@ -171,7 +170,7 @@
171170
},
172171
{
173172
"cell_type": "code",
174-
"execution_count": 7,
173+
"execution_count": 4,
175174
"metadata": {},
176175
"outputs": [],
177176
"source": [
@@ -199,8 +198,9 @@
199198
],
200199
"source": [
201200
"# Plot England boundary\n",
202-
"england_map = gis.map('England', zoomlevel=6)\n",
203-
"england_map.add_layer(england_boundary_layer)\n",
201+
"england_map = gis.map('England')\n",
202+
"england_map.zoom = 6\n",
203+
"england_map.content.add(england_boundary_layer)\n",
204204
"england_map"
205205
]
206206
},
@@ -215,7 +215,7 @@
215215
},
216216
{
217217
"cell_type": "code",
218-
"execution_count": 8,
218+
"execution_count": 6,
219219
"metadata": {},
220220
"outputs": [
221221
{
@@ -231,9 +231,9 @@
231231
" <div class=\"item_right\" style=\"float: none; width: auto; overflow: hidden;\">\n",
232232
" <a href='https://geosaurus.maps.arcgis.com/home/item.html?id=fd3ecbd95b7148b8a7cbcc866cedd514' target='_blank'><b>england_weather_stations1</b>\n",
233233
" </a>\n",
234-
" <br/><img src='https://geosaurus.maps.arcgis.com/home/js/jsapi/esri/css/images/item_type_icons/featureshosted16.png' style=\"vertical-align:middle;\">Feature Layer Collection by api_data_owner\n",
234+
" <br/><br/><img src='https://geosaurus.maps.arcgis.com/home/js/jsapi/esri/css/images/item_type_icons/featureshosted16.png' style=\"vertical-align:middle;\" width=16 height=16>Feature Layer Collection by api_data_owner\n",
235235
" <br/>Last Modified: December 20, 2019\n",
236-
" <br/>0 comments, 5 views\n",
236+
" <br/>0 comments, 34 views\n",
237237
" </div>\n",
238238
" </div>\n",
239239
" "
@@ -242,7 +242,7 @@
242242
"<Item title:\"england_weather_stations1\" type:Feature Layer Collection owner:api_data_owner>"
243243
]
244244
},
245-
"execution_count": 8,
245+
"execution_count": 6,
246246
"metadata": {},
247247
"output_type": "execute_result"
248248
}
@@ -255,7 +255,7 @@
255255
},
256256
{
257257
"cell_type": "code",
258-
"execution_count": 9,
258+
"execution_count": 7,
259259
"metadata": {},
260260
"outputs": [],
261261
"source": [
@@ -282,8 +282,9 @@
282282
],
283283
"source": [
284284
"# England weather stations\n",
285-
"england_weather_stations_map = gis.map('England', zoomlevel=6)\n",
286-
"england_weather_stations_map.add_layer(england_weather_stations_layer)\n",
285+
"england_weather_stations_map = gis.map('England')\n",
286+
"england_weather_stations_map.zoom = 6\n",
287+
"england_weather_stations_map.content.add(england_weather_stations_layer)\n",
287288
"england_weather_stations_map"
288289
]
289290
},
@@ -296,17 +297,9 @@
296297
},
297298
{
298299
"cell_type": "code",
299-
"execution_count": 11,
300+
"execution_count": 9,
300301
"metadata": {},
301302
"outputs": [
302-
{
303-
"name": "stderr",
304-
"output_type": "stream",
305-
"text": [
306-
"C:\\Users\\Supratim\\Anaconda3\\envs\\deeply_mad\\lib\\site-packages\\arcgis\\features\\layer.py:1995: FutureWarning: The pandas.datetime class is deprecated and will be removed from pandas in a future version. Import from datetime module instead.\n",
307-
" \"esriFieldTypeDate\" : pd.datetime,\n"
308-
]
309-
},
310303
{
311304
"data": {
312305
"text/html": [
@@ -342,39 +335,39 @@
342335
" <td>Albemarle</td>\n",
343336
" <td>55.016667</td>\n",
344337
" <td>-1.866667</td>\n",
345-
" <td>{'x': -207796.38285121127, 'y': 7365101.445978...</td>\n",
338+
" <td>{\"x\": -207796.38285121127, \"y\": 7365101.445978...</td>\n",
346339
" </tr>\n",
347340
" <tr>\n",
348341
" <th>1</th>\n",
349342
" <td>2</td>\n",
350343
" <td>Begwary</td>\n",
351344
" <td>52.216667</td>\n",
352345
" <td>-0.483333</td>\n",
353-
" <td>{'x': -53804.420512971476, 'y': 6839396.777444...</td>\n",
346+
" <td>{\"x\": -53804.420512971476, \"y\": 6839396.777444...</td>\n",
354347
" </tr>\n",
355348
" <tr>\n",
356349
" <th>2</th>\n",
357350
" <td>3</td>\n",
358351
" <td>Birmingham_airport</td>\n",
359-
" <td>52.450000</td>\n",
352+
" <td>52.45</td>\n",
360353
" <td>-1.733333</td>\n",
361-
" <td>{'x': -192953.78400456344, 'y': 6881903.804921...</td>\n",
354+
" <td>{\"x\": -192953.78400456344, \"y\": 6881903.804921...</td>\n",
362355
" </tr>\n",
363356
" <tr>\n",
364357
" <th>3</th>\n",
365358
" <td>4</td>\n",
366359
" <td>Blackpool_airport</td>\n",
367360
" <td>53.766667</td>\n",
368361
" <td>-3.033333</td>\n",
369-
" <td>{'x': -337669.1220358203, 'y': 7126089.0211904...</td>\n",
362+
" <td>{\"x\": -337669.1220358203, \"y\": 7126089.0211904...</td>\n",
370363
" </tr>\n",
371364
" <tr>\n",
372365
" <th>4</th>\n",
373366
" <td>5</td>\n",
374367
" <td>Boulmer_airport</td>\n",
375-
" <td>55.420300</td>\n",
376-
" <td>-1.599700</td>\n",
377-
" <td>{'x': -178077.78942199165, 'y': 7443868.808735...</td>\n",
368+
" <td>55.4203</td>\n",
369+
" <td>-1.5997</td>\n",
370+
" <td>{\"x\": -178077.78942199165, \"y\": 7443868.808735...</td>\n",
378371
" </tr>\n",
379372
" </tbody>\n",
380373
"</table>\n",
@@ -384,19 +377,19 @@
384377
" FID Station Y X \\\n",
385378
"0 1 Albemarle 55.016667 -1.866667 \n",
386379
"1 2 Begwary 52.216667 -0.483333 \n",
387-
"2 3 Birmingham_airport 52.450000 -1.733333 \n",
380+
"2 3 Birmingham_airport 52.45 -1.733333 \n",
388381
"3 4 Blackpool_airport 53.766667 -3.033333 \n",
389-
"4 5 Boulmer_airport 55.420300 -1.599700 \n",
382+
"4 5 Boulmer_airport 55.4203 -1.5997 \n",
390383
"\n",
391384
" SHAPE \n",
392-
"0 {'x': -207796.38285121127, 'y': 7365101.445978... \n",
393-
"1 {'x': -53804.420512971476, 'y': 6839396.777444... \n",
394-
"2 {'x': -192953.78400456344, 'y': 6881903.804921... \n",
395-
"3 {'x': -337669.1220358203, 'y': 7126089.0211904... \n",
396-
"4 {'x': -178077.78942199165, 'y': 7443868.808735... "
385+
"0 {\"x\": -207796.38285121127, \"y\": 7365101.445978... \n",
386+
"1 {\"x\": -53804.420512971476, \"y\": 6839396.777444... \n",
387+
"2 {\"x\": -192953.78400456344, \"y\": 6881903.804921... \n",
388+
"3 {\"x\": -337669.1220358203, \"y\": 7126089.0211904... \n",
389+
"4 {\"x\": -178077.78942199165, \"y\": 7443868.808735... "
397390
]
398391
},
399-
"execution_count": 11,
392+
"execution_count": 9,
400393
"metadata": {},
401394
"output_type": "execute_result"
402395
}
@@ -3980,9 +3973,10 @@
39803973
],
39813974
"source": [
39823975
"# Plot the interpolated temperature surface\n",
3983-
"eng_interpolated_temp = gis.map('England', zoomlevel=6)\n",
3984-
"eng_interpolated_temp.add_layer(oct1st_temp_surface)\n",
3985-
"eng_interpolated_temp.legend = True\n",
3976+
"eng_interpolated_temp = gis.map('England')\n",
3977+
"eng_interpolated_temp.zoom = 6\n",
3978+
"eng_interpolated_temp.content.add(oct1st_temp_surface)\n",
3979+
"eng_interpolated_temp.legend.enabled = True\n",
39863980
"eng_interpolated_temp"
39873981
]
39883982
},
@@ -4055,10 +4049,10 @@
40554049
"metadata": {
40564050
"esriNotebookRuntime": {
40574051
"notebookRuntimeName": "ArcGIS Notebook Python 3 Standard",
4058-
"notebookRuntimeVersion": "9.0"
4052+
"notebookRuntimeVersion": "5.0"
40594053
},
40604054
"kernelspec": {
4061-
"display_name": "Python 3",
4055+
"display_name": "Python 3 (ipykernel)",
40624056
"language": "python",
40634057
"name": "python3"
40644058
},
@@ -4072,9 +4066,9 @@
40724066
"name": "python",
40734067
"nbconvert_exporter": "python",
40744068
"pygments_lexer": "ipython3",
4075-
"version": "3.7.9"
4069+
"version": "3.11.9"
40764070
}
40774071
},
40784072
"nbformat": 4,
4079-
"nbformat_minor": 2
4073+
"nbformat_minor": 4
40804074
}

0 commit comments

Comments
 (0)