Skip to content

Commit 04f629c

Browse files
AtmaManirohitgeo
authored andcommitted
Updates to publisher samples (#38)
1 parent d569298 commit 04f629c

File tree

4 files changed

+40
-22
lines changed

4 files changed

+40
-22
lines changed

samples/05 Content Publishers/HTML table to Pandas Data Frame to Portal Item.ipynb

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"Refer here for instructions to [download and run this sample locally](https://developers.arcgis.com/python/sample-notebooks/#Download-and-run-the-sample-notebooks) on your computer"
8+
]
9+
},
310
{
411
"cell_type": "markdown",
512
"metadata": {},
@@ -307,12 +314,12 @@
307314
},
308315
"outputs": [],
309316
"source": [
310-
"from arcgis.gis import GIS\n",
317+
"from arcgis import GIS\n",
311318
"from arcgis.lyr import FeatureCollection\n",
312319
"from arcgis.viz import MapView\n",
313320
"import json\n",
314321
"\n",
315-
"gis = GIS(\"https://portalurl.domain.com/webcontext\", \"username\", \"password\")"
322+
"gis = GIS(\"portal or org url\", \"username\", \"password\")"
316323
]
317324
},
318325
{
@@ -334,7 +341,7 @@
334341
},
335342
"outputs": [],
336343
"source": [
337-
"map1 = gis.map('UK', 2)"
344+
"map1 = gis.map('UK', zoomlevel = 2)"
338345
]
339346
},
340347
{
@@ -462,18 +469,6 @@
462469
"nbconvert_exporter": "python",
463470
"pygments_lexer": "ipython3",
464471
"version": "3.5.2"
465-
},
466-
"widgets": {
467-
"state": {
468-
"910f4adbb86942e7a4bd37a4e39ecf95": {
469-
"views": [
470-
{
471-
"cell_index": 16
472-
}
473-
]
474-
}
475-
},
476-
"version": "1.2.0"
477472
}
478473
},
479474
"nbformat": 4,

samples/05 Content Publishers/Publishing SDs, Shapefiles and CSVs.ipynb

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"Refer here for instructions to [download and run this sample locally](https://developers.arcgis.com/python/sample-notebooks/#Download-and-run-the-sample-notebooks) on your computer"
8+
]
9+
},
310
{
411
"cell_type": "markdown",
512
"metadata": {},
@@ -22,8 +29,9 @@
2229
"outputs": [],
2330
"source": [
2431
"from IPython.display import display\n",
25-
"from arcgis.gis import *\n",
26-
"gis = GIS(\"https://yourorg.arcgis.com\", \"username\", \"password\")"
32+
"from arcgis import GIS\n",
33+
"import os\n",
34+
"gis = GIS(\"portal or org url\", \"username\", \"password\")"
2735
]
2836
},
2937
{

samples/05 Content Publishers/Publishing web maps and web scenes.ipynb

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"Refer here for instructions to [download and run this sample locally](https://developers.arcgis.com/python/sample-notebooks/#Download-and-run-the-sample-notebooks) on your computer"
8+
]
9+
},
310
{
411
"cell_type": "markdown",
512
"metadata": {},
@@ -22,11 +29,11 @@
2229
"import os\n",
2330
"import json\n",
2431
"from IPython.display import display\n",
25-
"from arcgis.gis import *\n",
32+
"from arcgis import GIS\n",
2633
"import arcgis.viz\n",
2734
"\n",
2835
"# connect to your GIS\n",
29-
"gis = GIS(\"http://yourorg.arcgis.com\",\"username\",\"password\")"
36+
"gis = GIS(\"portal or org url\",\"username\",\"password\")"
3037
]
3138
},
3239
{
@@ -92,7 +99,8 @@
9299
},
93100
"outputs": [],
94101
"source": [
95-
"search_result = gis.content.search(\"title:2012 USA Median Age AND owner:esri\", item_type = \"Map Service\", outside_org = True)"
102+
"search_result = gis.content.search(\"title:2012 USA Median Age AND owner:esri\", \n",
103+
" item_type = \"Map Service\", outside_org = True)"
96104
]
97105
},
98106
{

samples/05 Content Publishers/Using and updating GIS content.ipynb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"Refer here for instructions to [download and run this sample locally](https://developers.arcgis.com/python/sample-notebooks/#Download-and-run-the-sample-notebooks) on your computer"
8+
]
9+
},
310
{
411
"cell_type": "markdown",
512
"metadata": {},
@@ -23,11 +30,11 @@
2330
},
2431
"outputs": [],
2532
"source": [
26-
"from arcgis.gis import *\n",
33+
"from arcgis import GIS\n",
2734
"from IPython.display import display\n",
2835
"import arcgis.viz\n",
2936
"\n",
30-
"gis = GIS(\"http://www.yourorg.arcgis.com\",\"username\",\"password\")"
37+
"gis = GIS(\"portal or org url\",\"username\",\"password\")"
3138
]
3239
},
3340
{

0 commit comments

Comments
 (0)